@@ -1258,12 +1258,13 @@ def test_load_kube_config(self):
1258
1258
client_configuration = actual )
1259
1259
self .assertEqual (expected , actual )
1260
1260
1261
- def test_load_kube_config_from_stringio (self ):
1261
+ def test_load_kube_config_from_fileish (self ):
1262
1262
expected = FakeConfig (host = TEST_HOST ,
1263
1263
token = BEARER_TOKEN_FORMAT % TEST_DATA_BASE64 )
1264
- kubeconfig = self ._create_stringio_config ()
1264
+ config_fileish = io .StringIO ()
1265
+ config_fileish .write (yaml .safe_dump (self .TEST_KUBE_CONFIG ))
1265
1266
actual = FakeConfig ()
1266
- load_kube_config (config_file = kubeconfig , context = "simple_token" , client_configuration = actual )
1267
+ load_kube_config (config_file = config_fileish , context = "simple_token" , client_configuration = actual )
1267
1268
self .assertEqual (expected , actual )
1268
1269
1269
1270
def test_load_kube_config_from_dict (self ):
@@ -1642,11 +1643,6 @@ def _create_multi_config(self):
1642
1643
files .append (self ._create_temp_file (yaml .safe_dump (part )))
1643
1644
return ENV_KUBECONFIG_PATH_SEPARATOR .join (files )
1644
1645
1645
- def _create_stringio_config (self ):
1646
- obj = io .StringIO ()
1647
- obj .write (self .TEST_KUBE_CONFIG_PART1 )
1648
- return obj
1649
-
1650
1646
def test_list_kube_config_contexts (self ):
1651
1647
kubeconfigs = self ._create_multi_config ()
1652
1648
expected_contexts = [
0 commit comments