def test_includes_alternative_translations(self): result = _convert_word(self.fakeWord).in_source_language assert self.fakeWord["Also accepted"][0] in result assert self.fakeWord["Also accepted"][1] in result
def test_alternative_translations_are_optional(self): del self.fakeWord["Also accepted"] assert len(_convert_word(self.fakeWord).in_source_language) == 1
def test_synonyms_are_optional(self): del self.fakeWord["Synonyms"] assert len(_convert_word(self.fakeWord).in_target_language) == 1
def test_includes_translation(self): assert _convert_word( self.fakeWord ).in_source_language[0] == self.fakeWord["Translation"]
def test_includes_synonyms(self): result = _convert_word(self.fakeWord).in_target_language assert self.fakeWord["Synonyms"][0] in result assert self.fakeWord["Synonyms"][1] in result
def test_includes_main_word(self): assert _convert_word( self.fakeWord).in_target_language[0] == self.fakeWord["Word"]
def test_pictures_are_optional(self): del self.fakeWord["Images"] assert _convert_word(self.fakeWord).pictures is None
def test_includes_the_correct_pictures(self): assert _convert_word(self.fakeWord).pictures == self.fakeWord["Images"]
def test_returns_a_word_object(self): assert type(_convert_word(self.fakeWord)) == Word