Ejemplo n.º 1
0
 def test_5(self):
     for sentence in sentences_json["music"]["sentences"]:
             self.assertEqual(find_matched_keywords(sentence)[0], "music")
Ejemplo n.º 2
0
 def test_4(self):
     for sentence in sentences_json["search"]["sentences"]:
             self.assertEqual(find_matched_keywords(sentence)[0], "search")
Ejemplo n.º 3
0
 def test_2(self):
     for sentence in sentences_json["send_email"]["sentences"]:
             self.assertEqual(find_matched_keywords(sentence)[0], "send_email")
Ejemplo n.º 4
0
 def test_3(self):
     for sentence in sentences_json["translation"]["sentences"]:
             self.assertEqual(find_matched_keywords(sentence)[0], "translator")
Ejemplo n.º 5
0
 def test_1(self):
     #               (search,    example user sentence,     expected result)
     for sentence in sentences_json["news"]["sentences"]:
         print(sentence)
         self.assertEqual(find_matched_keywords(sentence)[0], "news")