示例#1
0
 def test_search_existing_food(self):
     result = searchController.searchFoods(name="pho bo")[0]
     assert result.name.lower() == "pho bo"
     assert result.restaurant.lower() == "tu lan"
     assert result.price == 8.75
     assert result.avgRating == 4.5
     assert result.numRating == 10
示例#2
0
 def test_search_existing_food(self):
   result = searchController.searchFoods(name="pho bo")[0]
   assert result.name.lower() == "pho bo"
   assert result.restaurant.lower() == "tu lan"
   assert result.price == 8.75
   assert result.avgRating == 4.5
   assert result.numRating == 10
示例#3
0
 def test_search_nonexisting_food(self):
     results = searchController.searchFoods(name="gibberish")
     assert len(results) == 0
示例#4
0
 def test_search_nonexisting_food(self):
   results = searchController.searchFoods(name="gibberish")
   assert len(results) == 0