add old api_key to set auth attributes
This commit is contained in:
parent
ded3d12e04
commit
a7c78291bf
@ -1399,11 +1399,13 @@ class TestKubernetesClientConfiguration(BaseTestCase):
|
||||
|
||||
def test_auth_settings_calls_get_api_key_with_prefix(self):
|
||||
expected_token = 'expected_token'
|
||||
old_token = 'old_token'
|
||||
|
||||
def fake_get_api_key_with_prefix(identifier):
|
||||
self.assertEqual('authorization', identifier)
|
||||
return expected_token
|
||||
config = Configuration()
|
||||
config.api_key['authorization'] = old_token
|
||||
config.get_api_key_with_prefix = fake_get_api_key_with_prefix
|
||||
self.assertEqual(expected_token,
|
||||
config.auth_settings()['BearerToken']['value'])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user