def test_greb_for_word_suggestion(self): for each_word, each_word_dict in data.MISSPELLED_WORDS.items(): options = {'word': each_word, 'meaning': True} captured_output = StringIO() sys.stdout = captured_output greb.greb(**options) sys.stdout = sys.__stdout__
def test_write_meaning_to_file(self): dummy_meaning_file = os.path.join(os.getcwd(), 'test', 'dummy_meaning.json') options = {'word': 'awesome', 'meaning': True, 'file_path': dummy_meaning_file} captured_output = StringIO() sys.stdout = captured_output greb.greb(**options) sys.stdout = sys.__stdout__ os.remove(dummy_meaning_file)
def test_write_meaning_to_file(self): dummy_meaning_file = os.path.join(os.getcwd(), 'test', 'dummy_meaning.json') options = { 'word': 'awesome', 'meaning': True, 'file_path': dummy_meaning_file } captured_output = StringIO() sys.stdout = captured_output greb.greb(**options) sys.stdout = sys.__stdout__ os.remove(dummy_meaning_file)
def test_greb_for_complete_word(self): dummy_meaning_file = os.path.join(os.getcwd(), 'test', 'dummy_meaning.json') options = { 'word': 'contribution', 'meaning': True, 'sentence': True, 'synonym': True, 'antonym': True, 'file_path': dummy_meaning_file } captured_output = StringIO() sys.stdout = captured_output greb.greb(**options) sys.stdout = sys.__stdout__ os.remove(dummy_meaning_file)
def test_greb_for_find_meaning_from_history(self): options = {'display_terminal': True} captured_output = StringIO() sys.stdout = captured_output greb.greb(**options) sys.stdout = sys.__stdout__
def test_greb_for_word_of_the_day(self): options = {'word_of_day': True} captured_output = StringIO() sys.stdout = captured_output greb.greb(**options) sys.stdout = sys.__stdout__
def test_greb_for_trending_words(self): options = {'trending_words': True} captured_output = StringIO() sys.stdout = captured_output greb.greb(**options) sys.stdout = sys.__stdout__