def test_calculate_total_two(self):
     pricer = BasketPricer([], [], [])
     pricer.basket_catalogue = [
         {
             "name": "Baked Beans",
             "quantity": 2,
             "price": 0.99,
             "total": 1.98,
             "discount": 5.00,
         },
         {
             "name": "Biscuits",
             "quantity": 1,
             "price": 1.20,
             "total": 1.20,
         },
         {
             "name": "Sardines",
             "quantity": 2,
             "price": 1.89,
             "total": 3.78,
             "discount": 0.95,
         },
     ]
     pricer.calculate_totals()
     expected = {"sub-total": 6.96, "discount": 5.95, "total": 4.03}
     self.assertEqual(expected, pricer.pricer)
 def test_calculate_total_one(self):
     pricer = BasketPricer([], [], [])
     pricer.basket_catalogue = [
         {
             "name": "Baked Beans",
             "quantity": 4,
             "price": 0.99,
             "total": 3.96,
             "discount": 0.99,
         },
         {
             "name": "Biscuits",
             "quantity": 1,
             "price": 1.20,
             "total": 1.20,
             "discount": 0.00,
         },
     ]
     pricer.calculate_totals()
     expected = {"sub-total": 5.16, "discount": 0.99, "total": 4.17}
     self.assertEqual(expected, pricer.pricer)