Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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]
Exemplo n.º 4
0
 def test_returns_a_list(self):
     assert type(convert_phrases([])) == list