fix: rename CLOCK_SKEW and separate client/server user case (#863)
* fix: rename CLOCK_SKEW and separate client/server user case
* update clock skew to 20s
diff --git a/tests/test_impersonated_credentials.py b/tests/test_impersonated_credentials.py
index 126c4c3..3dbb6ca 100644
--- a/tests/test_impersonated_credentials.py
+++ b/tests/test_impersonated_credentials.py
@@ -211,11 +211,11 @@
credentials = self.make_credentials(lifetime=None)
# Source credentials is refreshed only if it is expired within
- # _helpers.CLOCK_SKEW from now. We add a time_skew to the expiry, so
+ # _helpers.REFRESH_THRESHOLD from now. We add a time_skew to the expiry, so
# source credentials is refreshed only if time_skew <= 0.
credentials._source_credentials.expiry = (
_helpers.utcnow()
- + _helpers.CLOCK_SKEW
+ + _helpers.REFRESH_THRESHOLD
+ datetime.timedelta(seconds=time_skew)
)
credentials._source_credentials.token = "Token"
@@ -238,7 +238,7 @@
assert not credentials.expired
# Source credentials is refreshed only if it is expired within
- # _helpers.CLOCK_SKEW
+ # _helpers.REFRESH_THRESHOLD
if time_skew > 0:
source_cred_refresh.assert_not_called()
else: