def setUp(self):
        super(TestStoreAuthV1, self).setUp()
        conf = self.getConfig()

        conf_file = 'glance-swift.conf'
        self.swift_config_file = self.copy_data_file(conf_file, self.test_dir)
        conf.update({'swift_store_config_file': self.swift_config_file})

        moxfixture = self.useFixture(moxstubout.MoxStubout())
        self.stubs = moxfixture.stubs
        stub_out_swiftclient(self.stubs, conf['swift_store_auth_version'])
        self.mock_keystone_client()
        self.store = Store(self.conf)
        self.config(**conf)
        self.store.configure()
        self.register_store_schemes(self.store, 'swift')
        self.addCleanup(self.conf.reset)
Establish a clean test environment.
dataset/ETHPy150Open openstack/glance_store/glance_store/tests/unit/test_swift_store.py/TestStoreAuthV1.setUp