Fixes tests

This commit is contained in:
Christopher Neugebauer 2016-04-06 16:09:57 +10:00
parent 40bc5985f4
commit cc318dfa9b

View file

@ -38,9 +38,10 @@ class ProductController(object):
if cls(product).user_quantity_remaining(user) > 0 if cls(product).user_quantity_remaining(user) > 0
) )
failed_conditions = set(ConditionController.test_enabling_conditions( failed_and_messages = ConditionController.test_enabling_conditions(
user, products=passed_limits user, products=passed_limits
)) )
failed_conditions = set(i[0] for i in failed_and_messages)
out = list(passed_limits - failed_conditions) out = list(passed_limits - failed_conditions)
out.sort(key=lambda product: product.order) out.sort(key=lambda product: product.order)