Edm0nd/edmond/tests/test_plugin.py
2020-11-01 19:29:39 +01:00

7 lines
199 B
Python

from unittest.mock import patch
def get_plugin_patcher(plugin_class):
"""Return a context manager to patch a Plugin init."""
return patch.object(plugin_class, "__init__", lambda bot: None)