fake_deal: fixup call wrapper
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
from types import ModuleType
|
||||
from typing import Callable
|
||||
from typing import Any, Callable
|
||||
|
||||
|
||||
class FakeDeal:
|
||||
def __getattr__(self, _name: str) -> "FakeDeal":
|
||||
return FakeDeal()
|
||||
def __getattr__(self, name: str) -> "Callable":
|
||||
return self.mock_call
|
||||
|
||||
def __call__(self, func: Callable) -> Callable:
|
||||
def mock_call(self, *args: Any, **kwargs: Any) -> Callable:
|
||||
def wrapper(func: Callable) -> Callable:
|
||||
return func
|
||||
|
||||
return wrapper
|
||||
|
||||
|
||||
try:
|
||||
import deal as real_deal
|
||||
|
||||
Reference in New Issue
Block a user