Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

Commit a41dbfd

Browse files
author
Zac Pustejovsky
committed
py2.7 pep again
1 parent bf49ce5 commit a41dbfd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

config/kube_config_test.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ def _format_expiry_datetime(dt):
4646
return dt.strftime(EXPIRY_DATETIME_FORMAT)
4747

4848
def _get_expiry(loader):
49-
expired_gcp_conf = (item for item in loader._config.value.get("users") if item.get("name") ==
50-
"expired_gcp")
51-
return next(expired_gcp_conf).get("user").get("auth-provider").get("config").get("expiry")
49+
expired_gcp_conf = (item for item in loader._config.value.get("users")
50+
if item.get("name") == "expired_gcp")
51+
return next(expired_gcp_conf).get("user").get("auth-provider") \
52+
.get("config").get("expiry")
5253

5354
def _raise_exception(st):
5455
raise Exception(st)
@@ -69,8 +70,8 @@ def _raise_exception(st):
6970
TEST_PASSWORD = "pass"
7071
# token for me:pass
7172
TEST_BASIC_TOKEN = "Basic bWU6cGFzcw=="
72-
TEST_TOKEN_EXPIRY = _format_expiry_datetime(datetime.datetime.utcnow() -
73-
datetime.timedelta(minutes=EXPIRY_TIMEDELTA))
73+
TEST_TOKEN_EXPIRY = _format_expiry_datetime(
74+
datetime.datetime.utcnow() - datetime.timedelta(minutes=EXPIRY_TIMEDELTA))
7475

7576
TEST_SSL_HOST = "https://test-host"
7677
TEST_CERTIFICATE_AUTH = "cert-auth"
@@ -206,7 +207,7 @@ class TestConfigNode(BaseTestCase):
206207
{"name": "test_name2",
207208
"value": {"key1", "test"}},
208209
{"name": "test_name3", "value": [1, 2, 3]}],
209-
"with_names_dup": [{"name": "test_name", "value": "test_value"},
210+
"with_names_dup": [{"name": "test_name","value": "test_value"},
210211
{"name": "test_name",
211212
"value": {"key1", "test"}},
212213
{"name": "test_name3", "value": [1, 2, 3]}]}

0 commit comments

Comments
 (0)