Commit f61b7fd5 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Add helper methods to create nodes for testing purpose.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1486 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 56bcf0c6
...@@ -45,10 +45,21 @@ class MasterStorageHandlerTests(NeoTestBase): ...@@ -45,10 +45,21 @@ class MasterStorageHandlerTests(NeoTestBase):
self.client_address = ('127.0.0.1', self.client_port) self.client_address = ('127.0.0.1', self.client_port)
self.storage_address = ('127.0.0.1', self.storage_port) self.storage_address = ('127.0.0.1', self.storage_port)
def tearDown(self): def tearDown(self):
NeoTestBase.tearDown(self) NeoTestBase.tearDown(self)
def _allocatePort(self):
self.port = getattr(self, 'port', 1000) + 1
return self.port
def _getClient(self):
return self.identifyToMasterNode(node_type=NodeTypes.CLIENT,
ip='127.0.0.1', port=self._allocatePort())
def _getStorage(self):
return self.identifyToMasterNode(node_type=NodeTypes.STORAGE,
ip='127.0.0.1', port=self._allocatePort())
def getLastUUID(self): def getLastUUID(self):
return self.uuid return self.uuid
......
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