|
|
@@ -206,6 +206,9 @@ class TestShippingOfferForOrder(TestCase):
|
|
206
|
206
|
def setUp(self):
|
|
207
|
207
|
self.creator = OrderCreator()
|
|
208
|
208
|
self.basket = factories.create_basket(empty=True)
|
|
|
209
|
+
|
|
|
210
|
+ # add the product now so we can calculate the correct surcharges
|
|
|
211
|
+ add_product(self.basket, D("12.00"))
|
|
209
|
212
|
self.surcharges = SurchargeApplicator().get_applicable_surcharges(self.basket)
|
|
210
|
213
|
|
|
211
|
214
|
def apply_20percent_shipping_offer(self):
|
|
|
@@ -221,7 +224,6 @@ class TestShippingOfferForOrder(TestCase):
|
|
221
|
224
|
return offer
|
|
222
|
225
|
|
|
223
|
226
|
def test_shipping_offer_is_applied(self):
|
|
224
|
|
- add_product(self.basket, D("12.00"))
|
|
225
|
227
|
offer = self.apply_20percent_shipping_offer()
|
|
226
|
228
|
|
|
227
|
229
|
shipping = FixedPrice(D("5.00"), D("5.00"))
|
|
|
@@ -241,7 +243,6 @@ class TestShippingOfferForOrder(TestCase):
|
|
241
|
243
|
self.assertEqual(D("38.00"), order.total_incl_tax)
|
|
242
|
244
|
|
|
243
|
245
|
def test_zero_shipping_discount_is_not_created(self):
|
|
244
|
|
- add_product(self.basket, D("12.00"))
|
|
245
|
246
|
offer = self.apply_20percent_shipping_offer()
|
|
246
|
247
|
|
|
247
|
248
|
shipping = Free()
|