示例#1
0
 def test_setup_v3_without_api_version(self):
     self.patch(os, 'environ', V3_ENVIRON_WITH_VERSION)
     fixture = _credentials.EnvironKeystoneCredentialsFixture()
     fixture.setUp()
     fixture.credentials.validate()
     self.assertEqual(V3_PARAMS, fixture.credentials.to_dict())
示例#2
0
 def test_setup_v3(self):
     self.patch(os, 'environ', V3_ENVIRON)
     fixture = _credentials.EnvironKeystoneCredentialsFixture()
     fixture.setUp()
     fixture.credentials.validate()
     self.assertEqual(V3_PARAMS, fixture.credentials.to_dict())
示例#3
0
 def test_setup_with_no_credentials(self):
     fixture = _credentials.EnvironKeystoneCredentialsFixture()
     fixture.setUp()
     self.assertIsNone(fixture.credentials)
示例#4
0
 def test_setup_v2_with_tenant_name(self):
     self.patch(os, 'environ', V2_ENVIRON_WITH_TENANT_NAME)
     fixture = _credentials.EnvironKeystoneCredentialsFixture()
     fixture.setUp()
     fixture.credentials.validate()
     self.assertEqual(V2_PARAMS, fixture.credentials.to_dict())
示例#5
0
 def test_init(self):
     fixture = _credentials.EnvironKeystoneCredentialsFixture()
     self.assertIsNone(fixture.credentials)