def delete_tours(): print("\n\033[01m## Deletion ##\033[0m") make_test(lambda: TourController.delete_tour(3))(GuidedTourTest, "existing document", False) make_test(lambda: TourController.delete_tour(3))(GuidedTourTest, "existing document", True)
def test_delete_tour_1(self): print("existing tour") expected = { 'extendedDocs': [], 'name': 'Third tour', 'id': 3, 'description': 'This is the third guided tour' } assert TourController.delete_tour(3) == expected
def test_delete_tour_2(self): print("non existing tour") with pytest.raises(sqlalchemy.orm.exc.NoResultFound): TourController.delete_tour(3)
def delete_tour(doc_id): deleted_tour = TourController.delete_tour(doc_id) return ResponseOK(deleted_tour)
def delete_tour(doc_id): return send_response(lambda: TourController.delete_tour(doc_id))()