Commit 82f27499 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Fix test for finishTransaction(), partition table was not initialized.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1494 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 8a9c18b4
......@@ -115,6 +115,10 @@ class MasterClientHandlerTests(NeoTestBase):
storage_conn = self.getFakeConnection(storage_uuid, self.storage_address)
self.assertNotEquals(uuid, client_uuid)
conn = self.getFakeConnection(client_uuid, self.client_address)
self.app.pt = Mock({
'getPartition': 0,
'getCellList': [Mock({'getUUID': storage_uuid})],
})
service.askBeginTransaction(conn, packet, None)
oid_list = []
tid = self.app.tm.getLastTID()
......@@ -125,9 +129,9 @@ class MasterClientHandlerTests(NeoTestBase):
self.assertEquals(len(self.app.tm.getPendingList()), 1)
apptid = self.app.tm.getPendingList()[0]
self.assertEquals(tid, apptid)
txn = self.app.tm[tapptid]
txn = self.app.tm[tid]
self.assertEquals(len(txn.getOIDList()), 0)
self.assertEquals(len(txn.getUUIDSet()), 1)
self.assertEquals(len(txn.getUUIDList()), 1)
self.assertEquals(txn.getMessageId(), 9)
......
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