Ejemplo n.º 1
0
 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__
Ejemplo n.º 2
0
 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__
Ejemplo n.º 3
0
    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)
Ejemplo n.º 4
0
    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)
Ejemplo n.º 5
0
    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)
Ejemplo n.º 6
0
    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)
Ejemplo n.º 7
0
 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__
Ejemplo n.º 8
0
 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__
Ejemplo n.º 9
0
 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__
Ejemplo n.º 10
0
 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__
Ejemplo n.º 11
0
 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__
Ejemplo n.º 12
0
 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__