Skip to content

Commit ae0fb72

Browse files
committed
Fix flake8 errors
1 parent bcc9fc3 commit ae0fb72

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/aws_secretsmanager_caching/cache/items.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def get_secret_value(self, version_stage=None):
123123
if not value and self._exception:
124124
raise self._exception
125125
return deepcopy(value)
126-
126+
127127
def refresh_secret_now(self):
128128
"""Force a refresh of the cached secret.
129129
:rtype: None

test/unit/test_items.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,13 @@ def test_refresh_now(self):
6969

7070
ttl = config.secret_refresh_interval
7171

72-
# New refresh time will use the ttl and will be less than the old refresh time that was artificially set a month ahead
73-
# The new refresh time will be between now + ttl and now + (ttl / 2) if the secret was immediately refreshed
74-
self.assertTrue(new_refresh_time < old_refresh_time and new_refresh_time < datetime.now(timezone.utc) + timedelta(ttl))
72+
# New refresh time will use the ttl and will be less than the old refresh time
73+
# that was artificially set a month ahead
74+
# The new refresh time will be between now + ttl and now + (ttl / 2)
75+
# if the secret was immediately refreshed
76+
self.assertTrue(new_refresh_time < old_refresh_time
77+
and new_refresh_time < datetime.now(timezone.utc) + timedelta(ttl))
7578

76-
7779
def test_datetime_fix_is_refresh_needed(self):
7880
secret_cached_object = TestSecretCacheObject.TestObject(SecretCacheConfig(), None, None)
7981

0 commit comments

Comments
 (0)