Commit 93838e8c authored by Grégory Wisniewski's avatar Grégory Wisniewski

Use a method name that better fit with the usage.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1813 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 8bc41720
...@@ -110,7 +110,7 @@ class Application(object): ...@@ -110,7 +110,7 @@ class Application(object):
at this stage.""" at this stage."""
nm = self.nm nm = self.nm
nm.clear() nm.init()
self.cluster_state = None self.cluster_state = None
for address in self.master_addresses: for address in self.master_addresses:
......
...@@ -328,7 +328,7 @@ class NodeManager(object): ...@@ -328,7 +328,7 @@ class NodeManager(object):
raise RuntimeError('Unknown node type : %s' % node_type) raise RuntimeError('Unknown node type : %s' % node_type)
return self._createNode(klass, **kw) return self._createNode(klass, **kw)
def clear(self): def init(self):
self._node_set.clear() self._node_set.clear()
self._type_dict.clear() self._type_dict.clear()
self._state_dict.clear() self._state_dict.clear()
......
...@@ -207,7 +207,7 @@ class NodeManagerTests(NeoTestBase): ...@@ -207,7 +207,7 @@ class NodeManagerTests(NeoTestBase):
self.checkByServer(self.admin) self.checkByServer(self.admin)
self.checkByUUID(self.admin) self.checkByUUID(self.admin)
def testClear(self): def testInit(self):
""" Check that the manager clear all its content """ """ Check that the manager clear all its content """
manager = self.manager manager = self.manager
self.checkNodes([]) self.checkNodes([])
...@@ -216,17 +216,17 @@ class NodeManagerTests(NeoTestBase): ...@@ -216,17 +216,17 @@ class NodeManagerTests(NeoTestBase):
self.checkClients([]) self.checkClients([])
manager.add(self.master) manager.add(self.master)
self.checkMasters([self.master]) self.checkMasters([self.master])
manager.clear() manager.init()
self.checkNodes([]) self.checkNodes([])
self.checkMasters([]) self.checkMasters([])
manager.add(self.storage) manager.add(self.storage)
self.checkStorages([self.storage]) self.checkStorages([self.storage])
manager.clear() manager.init()
self.checkNodes([]) self.checkNodes([])
self.checkStorages([]) self.checkStorages([])
manager.add(self.client) manager.add(self.client)
self.checkClients([self.client]) self.checkClients([self.client])
manager.clear() manager.init()
self.checkNodes([]) self.checkNodes([])
self.checkClients([]) self.checkClients([])
......
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