@@ -896,14 +896,16 @@ def test_ssl_with_relative_ssl_files(self):
896
896
def test_load_kube_config (self ):
897
897
expected = FakeConfig (host = TEST_HOST ,
898
898
token = BEARER_TOKEN_FORMAT % TEST_DATA_BASE64 )
899
- config_file = self ._create_temp_file (yaml .dump (self .TEST_KUBE_CONFIG ))
899
+ config_file = self ._create_temp_file (
900
+ yaml .safe_dump (self .TEST_KUBE_CONFIG ))
900
901
actual = FakeConfig ()
901
902
load_kube_config (config_file = config_file , context = "simple_token" ,
902
903
client_configuration = actual )
903
904
self .assertEqual (expected , actual )
904
905
905
906
def test_list_kube_config_contexts (self ):
906
- config_file = self ._create_temp_file (yaml .dump (self .TEST_KUBE_CONFIG ))
907
+ config_file = self ._create_temp_file (
908
+ yaml .safe_dump (self .TEST_KUBE_CONFIG ))
907
909
contexts , active_context = list_kube_config_contexts (
908
910
config_file = config_file )
909
911
self .assertDictEqual (self .TEST_KUBE_CONFIG ['contexts' ][0 ],
@@ -916,7 +918,8 @@ def test_list_kube_config_contexts(self):
916
918
contexts )
917
919
918
920
def test_new_client_from_config (self ):
919
- config_file = self ._create_temp_file (yaml .dump (self .TEST_KUBE_CONFIG ))
921
+ config_file = self ._create_temp_file (
922
+ yaml .safe_dump (self .TEST_KUBE_CONFIG ))
920
923
client = new_client_from_config (
921
924
config_file = config_file , context = "simple_token" )
922
925
self .assertEqual (TEST_HOST , client .configuration .host )
0 commit comments