

def setUp(self):
    'Establish a clean test environment.'
    super(TestMultiTenantStoreContext, self).setUp()
    conf = SWIFT_CONF.copy()
    self.store = Store(self.conf)
    self.config(**conf)
    self.store.configure()
    self.register_store_schemes(self.store, 'swift')
    service_catalog = [{
        'endpoint_links': [],
        'endpoints': [{
            'region': 'RegionOne',
            'publicURL': 'http://127.0.0.1:0',
        }],
        'type': 'object-store',
        'name': 'Object Storage Service',
    }]
    self.ctx = mock.MagicMock(service_catalog=service_catalog, user='tenant:user1', tenant='tenant', auth_token='0123')
    self.addCleanup(self.conf.reset)

dataset/ETHPy150Open openstack/glance_store/glance_store/tests/unit/test_swift_store.py TestMultiTenantStoreContext.setUp/original