Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed issue with delegating max_purchase_quantity to wrapper

  • Loading branch information...
commit 5ee416584262c9b2c063c920926fb5fdac769e72 1 parent 7ac85a5
@codeinthehole codeinthehole authored
6 oscar/apps/partner/
@@ -202,11 +202,13 @@ def availability(self):
return get_partner_wrapper(
- def max_purchase_quantity(self, user):
+ def max_purchase_quantity(self, user=None):
Return an item's availability as a string
+ :param user: (optional) The user who wants to purchase
- return get_partner_wrapper(
+ return get_partner_wrapper(, user)
def dispatch_date(self):
3  oscar/apps/partner/tests/
@@ -58,6 +58,9 @@ def test_cancelling_allocation_ignores_too_big_allocations(self):
self.assertEqual(0, self.stockrecord.num_allocated)
self.assertEqual(10, self.stockrecord.num_in_stock)
+ def test_max_purchase_quantity(self):
+ self.assertEqual(10, self.stockrecord.max_purchase_quantity())
class DefaultWrapperTests(TestCase):
Please sign in to comment.
Something went wrong with that request. Please try again.