This commit is contained in:
Marc 2014-09-15 12:21:56 +00:00
parent a37df75f57
commit 3c9b5a4c19
1 changed files with 11 additions and 5 deletions

View File

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