python - AttributeError: 'function' object has no attribute ...
stackoverflow.com › questions › 58259094AttributeError: 'function' object has no attribute 'assert_called_once'. I am not mocking this correct, so could you please help me to find out why my mock does not work in this case. I have the right path to mock the function. I have tried this -> create_autospec to solve the AttributeError, but no luck. The code sample: class MyClass: def __init__ (self): self._data = {} def a (self, value): self._data = value @pytest.fixture def my_fixture (): return MyClass () @pytest.mark.asyncio ...