Просмотр исходного кода

Fix tax-related test issues

Should have checked this before pushing before...
master
David Winterbottom 12 лет назад
Родитель
Сommit
1cff7be95a

+ 1
- 0
oscar/apps/checkout/views.py Просмотреть файл

@@ -361,6 +361,7 @@ class PaymentDetailsView(OrderPlacementMixin, TemplateView):
361 361
     preview = False
362 362
 
363 363
     def dispatch(self, request, *args, **kwargs):
364
+        self.checkout_session = CheckoutSessionData(request)
364 365
         error_response = self.get_error_response()
365 366
         if error_response:
366 367
             return error_response

+ 2
- 2
oscar/apps/partner/strategy.py Просмотреть файл

@@ -28,7 +28,7 @@ class Selector(object):
28 28
     def strategy(self, request=None, user=None, **kwargs):
29 29
         # Default to the backwards-compatible strategy of picking the first
30 30
         # stockrecord.
31
-        return US(request)
31
+        return Default(request)
32 32
 
33 33
 
34 34
 class Base(object):
@@ -173,5 +173,5 @@ class Default(UseFirstStockRecord, StockRequired, NoTax, Structured):
173 173
 
174 174
 class US(UseFirstStockRecord, StockRequired, DeferredTax, Structured):
175 175
     """
176
-    Default strategy for the USA
176
+    Default strategy for the USA (just for testing really)
177 177
     """

+ 1
- 2
oscar/apps/shipping/repository.py Просмотреть файл

@@ -11,8 +11,7 @@ class Repository(object):
11 11
     Repository class responsible for returning ShippingMethod
12 12
     objects for a given user, basket etc
13 13
     """
14
-    methods = (methods.FixedPrice(D('5.00')),
15
-               methods.FixedPrice(D('10.00')))
14
+    methods = (methods.Free(),)
16 15
 
17 16
     def get_shipping_methods(self, user, basket, shipping_addr=None,
18 17
                              request=None, **kwargs):

+ 1
- 1
tests/integration/offer/shipping_benefit_tests.py Просмотреть файл

@@ -41,7 +41,7 @@ class StubRepository(Repository):
41 41
     shipping discounts to be tested.
42 42
     """
43 43
     def get_shipping_methods(self, basket):
44
-        methods = [FixedPrice(D('10.00'))]
44
+        methods = [FixedPrice(D('10.00'), D('10.00'))]
45 45
         return self.prime_methods(basket, methods)
46 46
 
47 47
 

+ 1
- 1
tests/integration/order/creator_tests.py Просмотреть файл

@@ -115,7 +115,7 @@ class TestPlacingOrderForDigitalGoods(TestCase):
115 115
 
116 116
 class StubRepository(Repository):
117 117
     """ Custom shipping methods """
118
-    methods = (FixedPrice(D('5.00')), Free())
118
+    methods = (FixedPrice(D('5.00'), D('5.00')), Free())
119 119
 
120 120
 
121 121
 class TestShippingOfferForOrder(TestCase):

Загрузка…
Отмена
Сохранить