Commit d939c90f authored by Vincent Pelletier's avatar Vincent Pelletier

handleAnswerPrimaryMaster doesn't raise any more, removing a XXX from test.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@722 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent e712e586
......@@ -384,13 +384,14 @@ class ClientHandlerTests(NeoTestBase):
conn = self.getConnection()
# If primary master is already set *and* is not given primary master
# handle call raises.
# XXX: is it acceptable for a handle call to raise without any proper fallback ?
self.assertRaises(ElectionFailure, client_handler.handleAnswerPrimaryMaster,
conn, None, test_node_uuid, [])
# Check that the call doesn't raise
client_handler.handleAnswerPrimaryMaster(conn, None, test_node_uuid, [])
# Check that the primary master changed
self.assertTrue(app.primary_master_node is node)
# Test sanity checks
getNodeByUUID_call_list = app.nm.mockGetNamedCalls('getNodeByUUID')
self.assertEqual(len(getNodeByUUID_call_list), 1)
self.assertEqual(getNodeByUUID_call_list[0].getParam(0), conn.getUUID())
self.assertEqual(getNodeByUUID_call_list[0].getParam(0), test_node_uuid)
getNodeByServer_call_list = app.nm.mockGetNamedCalls('getNodeByServer')
self.assertEqual(len(getNodeByServer_call_list), 0)
......
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