Example #1
0
 def setUp(self):
     NeoUnitTestBase.setUp(self)
     # create an application object
     config = self.getMasterConfiguration(master_number=1, replicas=1)
     self.app = Application(config)
     self.app.em.close()
     self.app.em = Mock()
     self.service = StorageServiceHandler(self.app)
Example #2
0
 def setUp(self):
     NeoUnitTestBase.setUp(self)
     # create an application object
     config = self.getMasterConfiguration(master_number=1, replicas=1)
     self.app = Application(config)
     self.app.em.close()
     self.app.pt.clear()
     self.app.em = Mock()
     self.service = StorageServiceHandler(self.app)
     self.client_handler = ClientServiceHandler(self.app)
     # define some variable to simulate client and storage node
     self.client_port = 11022
     self.storage_port = 10021
     self.master_port = 10010
     self.master_address = ('127.0.0.1', self.master_port)
     self.client_address = ('127.0.0.1', self.client_port)
     self.storage_address = ('127.0.0.1', self.storage_port)