Esempio n. 1
0
 def test_delete_a_recommendation(self):
     recommendation = Recommendation(1, "productId", "recommended",
                                     "categoryId")
     recommendation.save()
     self.assertEqual(len(Recommendation.all()), 1)
     recommendation.delete()
     self.assertEqual(len(Recommendation.all()), 0)
 def test_delete_a_recommendation(self):
     """ Delete a Recommendation """
     recommendation = Recommendation(customer_id=2,
                                     product_id=3, recommend_product_id=4,
                                     recommend_type="upsell")
     recommendation.save()
     self.assertEqual(len(Recommendation.all()), 1)
     # delete the recommendation and make sure it isn't in the database
     recommendation.delete()
     self.assertEqual(len(Recommendation.all()), 0)