def test_that_discount_calculated_is_right(self): # test that the discount calculated is correct deal = Deal(**self.deal) deal.save() self.assertEqual(deal.discount(), '50%')