Skip to content

Commit c6e8194

Browse files
committed
Adding config to init file and indentation fixes
1 parent e92495f commit c6e8194

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

config/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
from .config_exception import ConfigException
1616
from .incluster_config import load_incluster_config
1717
from .kube_config import (list_kube_config_contexts, load_kube_config,
18-
new_client_from_config)
18+
new_client_from_config, load_kube_config_from_dict)

config/kube_config_test.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@
3333
ConfigNode, FileOrData, KubeConfigLoader,
3434
KubeConfigMerger, _cleanup_temp_files,
3535
_create_temp_file_with_content,
36-
_get_kube_config_loader_for_yaml_file,
3736
_get_kube_config_loader,
37+
_get_kube_config_loader_for_yaml_file,
3838
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)
4140

4241
BEARER_TOKEN_FORMAT = "Bearer %s"
4342

@@ -1237,8 +1236,8 @@ def test_load_kube_config_from_dict(self):
12371236

12381237
actual = FakeConfig()
12391238
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)
12421241
self.assertEqual(expected, actual)
12431242

12441243
def test_list_kube_config_contexts(self):
@@ -1370,26 +1369,26 @@ def test__get_kube_config_loader_file_persist(self):
13701369
config_file = self._create_temp_file(
13711370
yaml.safe_dump(self.TEST_KUBE_CONFIG))
13721371
actual = _get_kube_config_loader(filename=config_file,
1373-
persist_config=True)
1372+
persist_config=True)
13741373
self.assertTrue(callable(actual._config_persister))
13751374
self.assertEquals(actual._config_persister.__name__, "save_changes")
13761375

13771376
def test__get_kube_config_loader_dict_no_persist(self):
13781377
expected = FakeConfig(host=TEST_HOST,
13791378
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)
13811381
self.assertIsNone(actual._config_persister)
13821382

13831383
def test__get_kube_config_loader_dict_persist(self):
13841384
expected = FakeConfig(host=TEST_HOST,
13851385
token=BEARER_TOKEN_FORMAT % TEST_DATA_BASE64)
13861386
actual = _get_kube_config_loader(config_dict=self.TEST_KUBE_CONFIG,
1387-
persist_config=True)
1387+
persist_config=True)
13881388
self.assertTrue(callable(actual._config_persister))
13891389
self.assertEquals(actual._config_persister.__name__, "save_changes")
13901390

13911391

1392-
13931392
class TestKubernetesClientConfiguration(BaseTestCase):
13941393
# Verifies properties of kubernetes.client.Configuration.
13951394
# These tests guard against changes to the upstream configuration class,

0 commit comments

Comments
 (0)