Beispiel #1
0
 def test_get_menus_no_results(self):
     """
     test about the services restaurant to test the result of get menus of
     a restaurant that doesn't have menus
     :return:
     """
     new_restaurant = Utils.create_restaurant()
     menus = RestaurantService.get_menus(new_restaurant.id)
     assert len(menus) == 0
     Utils.delete_restaurant(new_restaurant.id)
Beispiel #2
0
    def test_get_menus_ok(self):
        """
        test about the services restaurant to test the result of get menus of
        a restaurant
        :return:
        """
        new_restaurant = Utils.create_restaurant()
        new_menu1 = Utils.create_menu(new_restaurant.id, "Italian food")
        new_menu2 = Utils.create_menu(new_restaurant.id, "Chinese food")

        menus = RestaurantService.get_menus(new_restaurant.id)
        assert len(menus) == 2

        Utils.delete_menu(new_menu1.id)
        Utils.delete_menu(new_menu2.id)
        Utils.delete_restaurant(new_restaurant.id)