This commit is contained in:
Marc 2014-09-15 12:21:56 +00:00
parent a37df75f57
commit 3c9b5a4c19

View file

@ -259,12 +259,18 @@ class OrderTests(BaseTestCase):
groups = []
prev = None
for rate in rates:
elif not prev or (not rate.is_combinable and prev.plan != rate.plan):
if rate.quantity <= metric:
if not prev or (not rate.is_combinable and prev.plan != rate.plan):
groups.append([rate])
else:
groups[-1].append(rate)
results = []
for group in groups:
for rates in group:
ini = None
for rate in group:
if not ini:
ini = rate.quantity
return result