Commit 1d5e3bdb authored by Vincent Pelletier's avatar Vincent Pelletier

Use sets, as order actually doesn't matter.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2438 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 1273ed2f
......@@ -151,11 +151,12 @@ class StorageReplicationHandlerTests(NeoUnitTestBase):
self.assertEqual(len(calls), 1)
calls[0].checkArgs(pmin_oid, pmin_serial, plength, ppartition)
self.assertEqual(len(packet_list), len(object_list), packet_list)
for packet, (oid, serial) in zip(packet_list, object_list):
self.assertEqual(packet.getType(),
Packets.AskObject)
self.assertEqual(packet.decode(), (oid, serial, None))
self.assertEqual(len(packet_list), len(object_list),
([x.decode() for x in packet_list], object_list))
reference_set = set((x + (None, ) for x in object_list))
packet_set = set((x.decode() for x in packet_list))
assert len(packet_list) == len(reference_set) == len(packet_set)
self.assertEqual(reference_set, packet_set)
def test_connectionLost(self):
app = self.getApp()
......
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