mirror of
https://github.com/d9pouces/id_configurator.git
synced 2026-11-09 01:47:21 +01:00
feat: initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
from id_configurator.modules import base as base_module
|
||||
from id_configurator.modules.base import Module, all_modules, register
|
||||
|
||||
|
||||
def test_register_and_all_modules_are_isolated(monkeypatch) -> None:
|
||||
monkeypatch.setattr(base_module, "_REGISTRY", [])
|
||||
|
||||
class DummyModule(Module):
|
||||
name = "dummy"
|
||||
|
||||
def is_relevant(self, context) -> bool:
|
||||
return True
|
||||
|
||||
def apply(self, context) -> None:
|
||||
pass
|
||||
|
||||
register(DummyModule)
|
||||
|
||||
assert all_modules() == [DummyModule] # nosec B101
|
||||
Reference in New Issue
Block a user