Mocking decorators in python with mock and pytest
<p>How to patch my custom decorator with monkeypatch or pytest.mock? i manage to mock it by doing (answer to <a href="https://stackoverflow.com/questions/7667567/can-i-patch-a-python-decorator-before-it-wraps-a-function">this</a> question):</p>

<p><code>package.decorator = mytestdecorator</code></p>

<p>The problem is that it breaks some other tests where i actually need that decorator to work.</p>