Edm0nd/edmond/tests/test_plugin.py

7 lines
199 B
Python
Raw Normal View History

2020-11-01 19:27:12 +01:00
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)