Skip to content

Commit a2318b6

Browse files
authored
Fix for external decorators (#138)
* Fix for external decorators.
1 parent b64c5df commit a2318b6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mocket/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
__all__ = ("mocketize", "Mocket", "MocketEntry", "Mocketizer")
44

5-
__version__ = "3.9.36"
5+
__version__ = "3.9.37"

mocket/mocket.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,8 @@ def check_and_call(self, method):
599599
if callable(method):
600600
method()
601601

602-
@staticmethod
603-
def wrap(test=None, truesocket_recording_dir=None):
602+
@classmethod
603+
def wrap(cls, test=None, truesocket_recording_dir=None):
604604
def wrapper(t, *args, **kw):
605605
instance = args[0] if args else None
606606
namespace = None
@@ -612,7 +612,7 @@ def wrapper(t, *args, **kw):
612612
t.__name__,
613613
)
614614
)
615-
with Mocketizer(
615+
with cls(
616616
instance,
617617
namespace=namespace,
618618
truesocket_recording_dir=truesocket_recording_dir,

0 commit comments

Comments
 (0)