@@ -40,9 +40,7 @@ def test_helpers_denominate():
4040 assert helpers ._denominate (1e23 ) == "90949470177.29 TB"
4141
4242
43- def test_obj_action_triggers_key_cleanup_and_deletes_stale_key (
44- monkeypatch : MonkeyPatch ,
45- ):
43+ def test_obj_action_triggers_key_cleanup_and_deletes_stale_key ():
4644 now = int (time .time ())
4745 stale_timestamp = (
4846 now - 31 * 24 * 60 * 60
@@ -78,7 +76,7 @@ def call_operation_side_effect(resource, action, *args, **kwargs):
7876
7977 # OBJ plugin & CLI config mocks
8078 with (
81- patch ("linodecli.plugins.obj.__init__. CLI" ) as MockCLI ,
79+ patch ("linodecli.plugins.obj.CLI" ) as MockCLI ,
8280 patch .dict (
8381 obj .COMMAND_MAP ,
8482 {
@@ -122,9 +120,7 @@ def call_operation_side_effect(resource, action, *args, **kwargs):
122120 ), "Fresh key should not be deleted"
123121
124122
125- def test_obj_action_triggers_key_rotation (
126- monkeypatch : MonkeyPatch ,
127- ):
123+ def test_obj_action_triggers_key_rotation ():
128124 now = int (time .time ())
129125 # Key created 31 days ago, rotation period is 30 days
130126 old_timestamp = now - 60 * 60 * 24 * 31
@@ -153,7 +149,7 @@ def call_operation_side_effect(resource, action, *args, **kwargs):
153149
154150 # OBJ plugin & CLI config mocks
155151 with (
156- patch ("linodecli.plugins.obj.__init__. CLI" ) as MockCLI ,
152+ patch ("linodecli.plugins.obj.CLI" ) as MockCLI ,
157153 patch .dict (
158154 obj .COMMAND_MAP ,
159155 {
@@ -209,9 +205,7 @@ def call_operation_side_effect(resource, action, *args, **kwargs):
209205 ), "Old key was not deleted after rotation"
210206
211207
212- def test_obj_action_does_not_trigger_cleanup_if_recent (
213- monkeypatch : MonkeyPatch ,
214- ):
208+ def test_obj_action_does_not_trigger_cleanup_if_recent ():
215209 now = int (time .time ())
216210 # Set last cleanup to 1 hour ago (less than 24h)
217211 last_cleanup = now - 60 * 60
@@ -239,7 +233,7 @@ def call_operation_side_effect(resource, action, *args, **kwargs):
239233 return 200 , {}
240234
241235 with (
242- patch ("linodecli.plugins.obj.__init__. CLI" ) as MockCLI ,
236+ patch ("linodecli.plugins.obj.CLI" ) as MockCLI ,
243237 patch .dict (
244238 obj .COMMAND_MAP ,
245239 {
@@ -281,9 +275,7 @@ def call_operation_side_effect(resource, action, *args, **kwargs):
281275 ), "Cleanup should not be performed if it was done in the last 24 hours"
282276
283277
284- def test_obj_action_does_not_trigger_cleanup_if_disabled (
285- monkeypatch : MonkeyPatch ,
286- ):
278+ def test_obj_action_does_not_trigger_cleanup_if_disabled ():
287279 now = int (time .time ())
288280 stale_timestamp = now - 31 * 24 * 60 * 60
289281 stale_key = {
@@ -308,7 +300,7 @@ def call_operation_side_effect(resource, action, *args, **kwargs):
308300 return 200 , {}
309301
310302 with (
311- patch ("linodecli.plugins.obj.__init__. CLI" ) as MockCLI ,
303+ patch ("linodecli.plugins.obj.CLI" ) as MockCLI ,
312304 patch .dict (
313305 obj .COMMAND_MAP ,
314306 {
0 commit comments