def setUp(self): Recommendation.init_db() Recommendation.remove_all()
def test_get_recommendation_when_no_data_exist(self): """ Get a Recommendation thats not found when there is no data """ Recommendation.remove_all() resp = self.app.get('/recommendations/2') self.assertEqual(resp.status_code, status.HTTP_404_NOT_FOUND)
def recommendations_reset(): """ Removes all recommendations from the database """ Recommendation.remove_all() return make_response('', status.HTTP_204_NO_CONTENT)