예제 #1
0
 def test_7(self):
     for sentence in sentences_json["weather"]["weather"]:
         command = find_command(sentence)
         self.assertEqual(find_module_location(command),
                          "weather.get_weather")
예제 #2
0
 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")
예제 #3
0
 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")
예제 #4
0
 def test_5(self):
     for sentence in sentences_json["music"]["sentences"]:
         command = find_command(sentence)
         self.assertEqual(find_module_location(command), "music.play_music")
예제 #5
0
 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")
예제 #6
0
 def test_3(self):
     for sentence in sentences_json["translation"]["translation"]:
         command = find_command(sentence)
         self.assertEqual(find_module_location(command),
                          "translation.translate_language")
예제 #7
0
 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")