Commit 2788146d authored by Vincent Pelletier's avatar Vincent Pelletier

Don't check parameter's length.

This prevent using iterators, and there is an easy alternative.
parent 96e9ff99
......@@ -2336,7 +2336,6 @@ class TestInventoryDocument(InventoryAPITestCase):
inventory_list = inventory_list.dictionaries()
else:
inventory_list = inventory_list[:] # That list is modified in this method
self.assertEquals(len(inventory_list), len(criterion_dict_list))
for criterion_dict in criterion_dict_list:
success = False
for inventory_position in xrange(len(inventory_list)):
......@@ -2362,6 +2361,8 @@ class TestInventoryDocument(InventoryAPITestCase):
else:
raise AssertionError, 'No line in %r match %r' % \
(inventory_list, criterion_dict)
# Check all expected lines have been found.
self.assertFalse(inventory_list)
def assertInventoryEquals(self, value, inventory_kw):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment