Skip to content

Commit 7fc2c31

Browse files
authored
Merge pull request kubernetes-client#202 from roycaihw/fix/add-old-token
Add old api_key to set auth attributes
2 parents ded3d12 + a7c7829 commit 7fc2c31

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

config/kube_config_test.py

+2
Original file line numberDiff line numberDiff line change
@@ -1399,11 +1399,13 @@ def test_get_api_key_with_prefix_returns_token(self):
13991399

14001400
def test_auth_settings_calls_get_api_key_with_prefix(self):
14011401
expected_token = 'expected_token'
1402+
old_token = 'old_token'
14021403

14031404
def fake_get_api_key_with_prefix(identifier):
14041405
self.assertEqual('authorization', identifier)
14051406
return expected_token
14061407
config = Configuration()
1408+
config.api_key['authorization'] = old_token
14071409
config.get_api_key_with_prefix = fake_get_api_key_with_prefix
14081410
self.assertEqual(expected_token,
14091411
config.auth_settings()['BearerToken']['value'])

0 commit comments

Comments
 (0)