Commit e5fb619d authored by Vincent Pelletier's avatar Vincent Pelletier

Update test to follow changes introduced in r320.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@333 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 9194c66f
...@@ -96,17 +96,16 @@ class ClientEventHandlerTest(unittest.TestCase): ...@@ -96,17 +96,16 @@ class ClientEventHandlerTest(unittest.TestCase):
def _testMasterWithMethod(self, method): def _testMasterWithMethod(self, method):
uuid = self.getUUID() uuid = self.getUUID()
class App: app = Mock({'connectToPrimaryMasterNode': None})
primary_master_node = Mock({'getUUID': uuid}) app.primary_master_node = Mock({'getUUID': uuid})
master_conn = Mock({'close': None, 'getUUID': uuid}) app.master_conn = Mock({'close': None, 'getUUID': uuid})
app = App()
dispatcher = self.getDispatcher() dispatcher = self.getDispatcher()
method(dispatcher, app, uuid=uuid) method(dispatcher, app, uuid=uuid)
# XXX: should connection closure be tested ? It's not implemented in all cases # XXX: should connection closure be tested ? It's not implemented in all cases
#self.assertEquals(len(App.master_conn.mockGetNamedCalls('close')), 1) #self.assertEquals(len(App.master_conn.mockGetNamedCalls('close')), 1)
#self.assertEquals(app.master_conn, None) #self.assertEquals(app.master_conn, None)
#self.assertEquals(app.primary_master_node, None) #self.assertEquals(app.primary_master_node, None)
self.assertEquals(len(dispatcher.mockGetNamedCalls('connectToPrimaryMasterNode')), 1) self.assertEquals(len(app.mockGetNamedCalls('connectToPrimaryMasterNode')), 1)
def _testStorageWithMethod(self, method, state=TEMPORARILY_DOWN_STATE): def _testStorageWithMethod(self, method, state=TEMPORARILY_DOWN_STATE):
storage_ip = '127.0.0.1' storage_ip = '127.0.0.1'
......
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