Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. Traceback (most recent call last):
  2. File "/code/apps/basket/tests/test_models.py", line 37, in test_add_product
  3. self.basket.add_product(self.product)
  4. File "/code/apps/basket/models.py", line 57, in add_product
  5. stock_info = self.get_stock_info(product, options)
  6. File "/usr/local/lib/python3.7/site-packages/oscar/apps/basket/abstract_models.py", line 183, in get_stock_info
  7. return self.strategy.fetch_for_product(product)
  8. File "/usr/local/lib/python3.7/site-packages/oscar/apps/basket/abstract_models.py", line 106, in _get_strategy
  9. "No strategy class has been assigned to this basket. "
  10. 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