def setUp(self): self.app = proxy_server.Application(None, FakeMemcache(), account_ring=FakeAccountRing(''), container_ring=FakeContainerRing(''), object_ring=FakeObjectRing(''), logger=FakeLogger()) self.base = Controller(self.app)
def setUp(self): logger = debug_logger('proxy-server') logger.thread_locals = ('txn1', '127.0.0.2') self.app = proxy_server.Application( None, FakeMemcache(), account_ring=FakeAccountRing(''), container_ring=FakeContainerRing(''), object_ring=FakeObjectRing(''), logger=logger) self.controller = proxy_server.ObjectController( self.app, 'a', 'c', 'o') self.controller.container_info = mock.MagicMock( return_value={ 'node': [ { 'ip': '127.0.0.1', 'port': '1' }, ], 'filesystem': 'fs0', 'directory': 'd0', 'sync_key': None, 'write_acl': None, 'versions': None, 'read_acl': None })