Glossary: Refactoring and Clean Code
monkeypatch
Also written: monkeypatch.setattr
A pytest fixture that replaces a name inside a module for one test, such as a fake `send_email`, and restores the original afterwards.
Glossary: Refactoring and Clean Code
Also written: monkeypatch.setattr
A pytest fixture that replaces a name inside a module for one test, such as a fake `send_email`, and restores the original afterwards.