Flask + Vue rewrite of the classic-ASP shopdb, built as a plugin framework so sister GE Aerospace sites can adopt it. Product version 0.7.0-pre-0.8.0, plugin contract 0.11.0, 966 backend tests. Key entry points: - docs/INSTALL-WINDOWS-IIS.md - tested Windows + IIS install runbook (own-site and subpath deployment methods) - docs/PILOT-DEPLOY.md - production pilot: stand up + import + verify - docs/IMPORT-API.md - schema-agnostic legacy data import contract - scripts/site_imports/wjf/ - West Jefferson reference import loader - docs/adr/ - twelve accepted architecture decision records
31 lines
984 B
Cheetah
31 lines
984 B
Cheetah
"""$Name plugin smoke tests.
|
|
|
|
Asserts the plugin loads cleanly and satisfies the framework contract.
|
|
Replace and extend with domain tests as you build the plugin out.
|
|
"""
|
|
|
|
from plugins.$name.plugin import ${Name}Plugin
|
|
|
|
|
|
def test_${name}_plugin_meta_is_valid():
|
|
"""${Name}Plugin.meta returns a PluginMeta with the expected name."""
|
|
plugin = ${Name}Plugin()
|
|
assert plugin.meta.name == '$name'
|
|
assert plugin.meta.api_prefix == '/api/$name'
|
|
|
|
|
|
def test_${name}_plugin_get_blueprint_returns_blueprint():
|
|
"""get_blueprint returns a Flask Blueprint, not None."""
|
|
from flask import Blueprint
|
|
plugin = ${Name}Plugin()
|
|
assert isinstance(plugin.get_blueprint(), Blueprint)
|
|
|
|
|
|
def test_${name}_plugin_get_models_returns_a_model():
|
|
"""get_models returns a list with at least one SQLAlchemy model."""
|
|
plugin = ${Name}Plugin()
|
|
models = plugin.get_models()
|
|
assert len(models) >= 1
|
|
for model in models:
|
|
assert hasattr(model, '__tablename__')
|