Exemple #1
0
 def setUp(self):
     Recommendation.init_db()
     Recommendation.remove_all()
Exemple #2
0
 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)
Exemple #3
0
def recommendations_reset():
    """ Removes all recommendations from the database """
    Recommendation.remove_all()
    return make_response('', status.HTTP_204_NO_CONTENT)