Skip to content

Commit 4088b8e

Browse files
Change methods not using its bound instance to staticmethods (#180)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
1 parent 4ea32fc commit 4088b8e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

mocket/plugins/pook_mock_engine.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ def single_register(cls, method, uri, body='', status=200, headers=None, match_q
2828

2929

3030
class MocketInterceptor(BaseInterceptor):
31-
def activate(self):
31+
@staticmethod
32+
def activate():
3233
Mocket.disable()
3334
Mocket.enable()
3435

35-
def disable(self):
36+
@staticmethod
37+
def disable():
3638
Mocket.disable()
3739

3840

tests/main/test_redis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def test_register(self):
8787
Mocket._entries[("localhost", 6379)][0].responses[0].data, b"+OK\r\n"
8888
)
8989

90-
def test_register_response(self):
90+
@staticmethod
91+
def test_register_response():
9192
Entry.register_response(command='SET snowman "is ☃!"', response="")
9293

9394

0 commit comments

Comments
 (0)