def setUp(self): super(KeystoneSessionFixtureTest, self).setUp() from tobiko.openstack.keystone import _credentials from tobiko.openstack.keystone import _session tobiko.remove_fixture(self.default_credentials_fixture) self.patch(_credentials, 'DefaultKeystoneCredentialsFixture', DefaultCredentialsFixture) self.patch(_session, 'SESSIONS', _session.KeystoneSessionManager())
def _test_remove_fixture(self, obj): fixture = tobiko.get_fixture(obj) result = tobiko.remove_fixture(obj) self.assertIs(fixture, result) self.assertIsNot(fixture, tobiko.get_fixture(obj)) fixture.setup_fixture.assert_not_called() fixture.cleanup_fixture.assert_not_called()
def setUp(self): super(DefaultKeystoneCredentialsFixtureTest, self).setUp() self.patch_config({}) self.patch(os, 'environ', {}) tobiko.remove_fixture(_credentials.ConfigKeystoneCredentialsFixture) tobiko.remove_fixture(_credentials.EnvironKeystoneCredentialsFixture)
def setUp(self): super(SharedFixtureTest, self).setUp() tobiko.remove_fixture(MyFixture)