File tree 2 files changed +7
-5
lines changed
src/aws_secretsmanager_caching/cache 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ def get_secret_value(self, version_stage=None):
123
123
if not value and self ._exception :
124
124
raise self ._exception
125
125
return deepcopy (value )
126
-
126
+
127
127
def refresh_secret_now (self ):
128
128
"""Force a refresh of the cached secret.
129
129
:rtype: None
Original file line number Diff line number Diff line change @@ -69,11 +69,13 @@ def test_refresh_now(self):
69
69
70
70
ttl = config .secret_refresh_interval
71
71
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 ))
75
78
76
-
77
79
def test_datetime_fix_is_refresh_needed (self ):
78
80
secret_cached_object = TestSecretCacheObject .TestObject (SecretCacheConfig (), None , None )
79
81
You can’t perform that action at this time.
0 commit comments