Пример #1
0
    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())
Пример #2
0
 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()
Пример #3
0
 def setUp(self):
     super(DefaultKeystoneCredentialsFixtureTest, self).setUp()
     self.patch_config({})
     self.patch(os, 'environ', {})
     tobiko.remove_fixture(_credentials.ConfigKeystoneCredentialsFixture)
     tobiko.remove_fixture(_credentials.EnvironKeystoneCredentialsFixture)
Пример #4
0
 def setUp(self):
     super(SharedFixtureTest, self).setUp()
     tobiko.remove_fixture(MyFixture)