예제 #1
0
 def test_calls_convert_phrases_with_correct_values(self, convert_phrase):
     word1 = fakes.fake_value()
     word2 = fakes.fake_value()
     _convert_phrases([word1, word2])
     convert_phrase.assert_any_call(word1)
     convert_phrase.assert_any_call(word2)
예제 #2
0
 def test_converts_every_word(self, convert_phrase):
     raw_words = [None] * random.randint(0, 1000)
     assert len(_convert_phrases(raw_words)) == len(raw_words)
예제 #3
0
 def test_returns_correct_value(self, convert_phrase):
     convert_phrase.return_value = fakes.fake_value()
     assert _convert_phrases([None]) == [convert_phrase.return_value]
예제 #4
0
 def test_returns_a_list(self):
     assert type(_convert_phrases([])) == list