s365b.modules.testing¶
Contract checks that every module must pass.
Module authors call these from their own tests:
from s365b.modules.testing import assert_module_contract
def test_contract():
assert_module_contract(ExchangeModule)
The project’s own test suite also runs them against every installed module.
Functions¶
|
Assert that a module class follows the static parts of the contract. |
Module Contents¶
- s365b.modules.testing.assert_module_contract(cls: type[s365b.modules.sdk.BackupModule]) None[source]¶
Assert that a module class follows the static parts of the contract.
Checks: valid metadata and config model, well-formed permission names, backup permissions are a subset of what restore needs or read-only, unique item type and event IDs.
- Parameters:
cls – Module class to check.
- Raises:
AssertionError – Describing the first violation.