|
33 | 33 | ConfigNode, FileOrData, KubeConfigLoader,
|
34 | 34 | KubeConfigMerger, _cleanup_temp_files,
|
35 | 35 | _create_temp_file_with_content,
|
36 |
| - _get_kube_config_loader_for_yaml_file, |
37 | 36 | _get_kube_config_loader,
|
| 37 | + _get_kube_config_loader_for_yaml_file, |
38 | 38 | list_kube_config_contexts, load_kube_config,
|
39 |
| - load_kube_config_from_dict, |
40 |
| - new_client_from_config) |
| 39 | + load_kube_config_from_dict, new_client_from_config) |
41 | 40 |
|
42 | 41 | BEARER_TOKEN_FORMAT = "Bearer %s"
|
43 | 42 |
|
@@ -1237,8 +1236,8 @@ def test_load_kube_config_from_dict(self):
|
1237 | 1236 |
|
1238 | 1237 | actual = FakeConfig()
|
1239 | 1238 | load_kube_config_from_dict(config_dict=self.TEST_KUBE_CONFIG,
|
1240 |
| - context="simple_token", |
1241 |
| - client_configuration=actual) |
| 1239 | + context="simple_token", |
| 1240 | + client_configuration=actual) |
1242 | 1241 | self.assertEqual(expected, actual)
|
1243 | 1242 |
|
1244 | 1243 | def test_list_kube_config_contexts(self):
|
@@ -1370,26 +1369,26 @@ def test__get_kube_config_loader_file_persist(self):
|
1370 | 1369 | config_file = self._create_temp_file(
|
1371 | 1370 | yaml.safe_dump(self.TEST_KUBE_CONFIG))
|
1372 | 1371 | actual = _get_kube_config_loader(filename=config_file,
|
1373 |
| - persist_config=True) |
| 1372 | + persist_config=True) |
1374 | 1373 | self.assertTrue(callable(actual._config_persister))
|
1375 | 1374 | self.assertEquals(actual._config_persister.__name__, "save_changes")
|
1376 | 1375 |
|
1377 | 1376 | def test__get_kube_config_loader_dict_no_persist(self):
|
1378 | 1377 | expected = FakeConfig(host=TEST_HOST,
|
1379 | 1378 | token=BEARER_TOKEN_FORMAT % TEST_DATA_BASE64)
|
1380 |
| - actual = _get_kube_config_loader_for_yaml_file(config_dict=self.TEST_KUBE_CONFIG) |
| 1379 | + actual = _get_kube_config_loader_for_yaml_file( |
| 1380 | + config_dict=self.TEST_KUBE_CONFIG) |
1381 | 1381 | self.assertIsNone(actual._config_persister)
|
1382 | 1382 |
|
1383 | 1383 | def test__get_kube_config_loader_dict_persist(self):
|
1384 | 1384 | expected = FakeConfig(host=TEST_HOST,
|
1385 | 1385 | token=BEARER_TOKEN_FORMAT % TEST_DATA_BASE64)
|
1386 | 1386 | actual = _get_kube_config_loader(config_dict=self.TEST_KUBE_CONFIG,
|
1387 |
| - persist_config=True) |
| 1387 | + persist_config=True) |
1388 | 1388 | self.assertTrue(callable(actual._config_persister))
|
1389 | 1389 | self.assertEquals(actual._config_persister.__name__, "save_changes")
|
1390 | 1390 |
|
1391 | 1391 |
|
1392 |
| - |
1393 | 1392 | class TestKubernetesClientConfiguration(BaseTestCase):
|
1394 | 1393 | # Verifies properties of kubernetes.client.Configuration.
|
1395 | 1394 | # These tests guard against changes to the upstream configuration class,
|
|
0 commit comments