Test coverage: plugin lifecycle, registry, lockout unlock, contract fleet, seed
Fills the review's highest-value coverage gaps in the framework's own core feature. New tests/test_plugin_lifecycle.py: manager enable/disable dependency guards (beta depends on alpha - enable-beta-first refused, disable-alpha-while-beta-on refused) via synthetic plugins; enable seeds a plugin's RBAC permissions idempotently; registry disable-survives-reload, corrupt-file recovery, and the equipment->machines rename migration; `flask seed settings` idempotency. test_plugin_contract.py: BUNDLED_PLUGINS now covers all bundled plugins incl. geenforce, measuringtools, warranty (was 9, contradicting the CLAUDE.md "all bundled satisfy the contract" claim); the structural checks now run against them. test_authz.py: account lockout auto-unlock path (expired lockeduntil -> correct password logs in and clears the lock state), previously untested. All new tests pass; naming green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ from shopdb.plugins import plugin_manager
|
||||
from shopdb.plugins.base import BasePlugin, PluginMeta
|
||||
|
||||
|
||||
BUNDLED_PLUGINS = ('computers', 'employees', 'knowledgebase', 'machines', 'network', 'notifications', 'printers', 'slides', 'usb')
|
||||
BUNDLED_PLUGINS = ('computers', 'employees', 'geenforce', 'knowledgebase', 'machines', 'measuringtools', 'network', 'notifications', 'printers', 'slides', 'usb', 'warranty')
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
Reference in New Issue
Block a user