Beispiel #1
0
 def setUp(self):
     super(MasterHandlerTests, self).setUp()
     self.db = Mock()
     self.app = Mock({'getDB': self.db, 'txn_contexts': ()})
     self.app.nm = NodeManager()
     self.app.dispatcher = Mock()
     self._next_port = 3000
Beispiel #2
0
 def formatPartitionTable(self, row_list):
     nm = NodeManager()
     nm.update(dummy_app, 1,
               self.neoctl.getNodeList(node_type=NodeTypes.STORAGE))
     pt = object.__new__(PartitionTable)
     pt._load(None, None, row_list, nm.getByUUID)
     pt.addNodeList(nm.getByStateList(NodeStates.RUNNING))
     return '\n'.join(line[4:] for line in pt._format())
Beispiel #3
0
 def __init__(self, app, name, master_addresses):
     self.app = weakref.proxy(app)
     self.name = name
     self.nm = NodeManager()
     for master_address in master_addresses:
         self.nm.createMaster(address=master_address)
Beispiel #4
0
 def setUp(self):
     NeoUnitTestBase.setUp(self)
     self.manager = NodeManager()