Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Traceback (most recent call last):
- File "/code/apps/basket/tests/test_models.py", line 37, in test_add_product
- self.basket.add_product(self.product)
- File "/code/apps/basket/models.py", line 57, in add_product
- stock_info = self.get_stock_info(product, options)
- File "/usr/local/lib/python3.7/site-packages/oscar/apps/basket/abstract_models.py", line 183, in get_stock_info
- return self.strategy.fetch_for_product(product)
- File "/usr/local/lib/python3.7/site-packages/oscar/apps/basket/abstract_models.py", line 106, in _get_strategy
- "No strategy class has been assigned to this basket. "
- RuntimeError: No strategy class has been assigned to this basket. This is normally assigned to the incoming request in oscar.apps.basket.middleware.BasketMiddleware. Since it is missing, you must be doing something different. Ensure that a strategy instance is assigned to the basket!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement