mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-18 16:29:56 +00:00
* move argument parsers to handlers themselves
* use hatchling instead of flit
* Revert "use hatchling instead of flit"
This reverts commit d18d146d79
.
* add package-splitt script
* replace simplify walk method
* split packages
* explicitly install packages
* separate support triggers from main package
* add docs examples
* sort actions
* docs update
* add metapackage
* review fixes
26 lines
686 B
Python
26 lines
686 B
Python
import ahriman.web.views
|
|
|
|
from pathlib import Path
|
|
|
|
from ahriman.core.module_loader import _modules, implementations
|
|
from ahriman.web.views.base import BaseView
|
|
|
|
|
|
def test_modules() -> None:
|
|
"""
|
|
must load modules
|
|
"""
|
|
modules = list(_modules(Path(__file__).parent.parent, "ahriman.web.views"))
|
|
assert modules
|
|
assert all(not module.ispkg for module in modules)
|
|
|
|
|
|
def test_implementations() -> None:
|
|
"""
|
|
must load implementations from the package
|
|
"""
|
|
routes = list(implementations(ahriman.web.views, BaseView))
|
|
assert routes
|
|
assert all(isinstance(view, type) for view in routes)
|
|
assert all(issubclass(view, BaseView) for view in routes)
|