def test_get_menu_photos_with_url_not_exist(self): """ test about the services restaurant to test the result of get a photo of a menu searching using a not existing URL :return: """ photo = RestaurantService.get_menu_photo_with_url( "http://phototest1.com") assert photo is None
def test_get_menu_photos_with_url_ok(self): """ test about the services restaurant to test the result of get a photo of a menu searching using its URL :return: """ new_restaurant = Utils.create_restaurant() new_menu = Utils.create_menu(new_restaurant.id, "Italian food") new_photo = Utils.create_menu_photo(new_menu.id, "http://phototest1.com") photo = RestaurantService.get_menu_photo_with_url(new_photo.url) assert photo is not None assert photo.url == "http://phototest1.com" Utils.delete_menu_photo(new_photo.id) Utils.delete_menu(new_menu.id) Utils.delete_restaurant(new_restaurant.id)