def test_7(self): for sentence in sentences_json["weather"]["weather"]: command = find_command(sentence) self.assertEqual(find_module_location(command), "weather.get_weather")
def test_9(self): for sentence in sentences_json["tv_off"]["sentences"]: command = find_command(sentence) self.assertEqual(find_module_location(command), "tv.turn_tv_off")
def test_6(self): for sentence in sentences_json["read_email"]["sentences"]: command = find_command(sentence) self.assertEqual(find_module_location(command), "emails.read_unread_email")
def test_5(self): for sentence in sentences_json["music"]["sentences"]: command = find_command(sentence) self.assertEqual(find_module_location(command), "music.play_music")
def test_4(self): for sentence in sentences_json["search"]["search"]: command = find_command(sentence) self.assertEqual(find_module_location(command), "search_information.search_wiki")
def test_3(self): for sentence in sentences_json["translation"]["translation"]: command = find_command(sentence) self.assertEqual(find_module_location(command), "translation.translate_language")
def test_1(self): # (search, example user sentence, expected result) for sentence in sentences_json["news"]["sentences"]: # find command first then location command = find_command(sentence) self.assertEqual(find_module_location(command), "news.get_news")