mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
14 lines
319 B
Python
14 lines
319 B
Python
import pytest
|
|
|
|
|
|
@pytest.fixture
|
|
def register_plugin(request, monkeypatch):
|
|
def inner(globals, cls):
|
|
from sentry.plugins.base import plugins
|
|
|
|
monkeypatch.setitem(globals, cls.__name__, cls)
|
|
plugins.register(cls)
|
|
request.addfinalizer(lambda: plugins.unregister(cls))
|
|
|
|
return inner
|