We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f85a41f commit bfa9681Copy full SHA for bfa9681
1 file changed
config/kube_config_test.py
@@ -1262,7 +1262,12 @@ def test_load_kube_config_from_file_like_object(self):
1262
expected = FakeConfig(host=TEST_HOST,
1263
token=BEARER_TOKEN_FORMAT % TEST_DATA_BASE64)
1264
config_file_like_object = io.StringIO()
1265
- config_file_like_object.write(yaml.safe_dump(self.TEST_KUBE_CONFIG))
+ #py3 (won't have unicode) vs py2 (requires it)
1266
+ try:
1267
+ unicode('')
1268
+ config_file_like_object.write(unicode(yaml.safe_dump(self.TEST_KUBE_CONFIG)), errors='replace')
1269
+ except NameError:
1270
+ config_file_like_object.write(yaml.safe_dump(self.TEST_KUBE_CONFIG))
1271
actual = FakeConfig()
1272
load_kube_config(config_file=config_file_like_object, context="simple_token",
1273
client_configuration=actual)
0 commit comments