fix: tests

This commit is contained in:
Alex committed 2026-06-14 22:38:28 +01:00
1 parent e38e660c83
commit 82cd7b7d49
2 files changed
+7 -2

No files matched your search

+7
View File
@@ -5,6 +5,7 @@ Main user API routes - registers all namespace modules.
from flask import Blueprint
from application.api import api
from application.api.admin import admin_ns
from .agents import (
agents_folders_ns,
agents_ns,
@@ -69,3 +70,9 @@ api.add_namespace(tools_mcp_ns)
# Workflows
api.add_namespace(workflows_ns)
# Admin (admin-gated management endpoints). Registered here, in this
# import-cached module, rather than in app.py's body so a re-import of
# application.app (e.g. coverage tests that reload the module) doesn't re-fire
# add_namespace against the already-initialized Api.
api.add_namespace(admin_ns)
-2
View File
@@ -15,7 +15,6 @@ from application.core.logging_config import setup_logging
setup_logging()
from application.api import api # noqa: E402
from application.api.admin import admin_ns # noqa: E402
from application.api.answer import answer # noqa: E402
from application.api.devices import devices_bp # noqa: E402
from application.api.events.routes import events # noqa: E402
@@ -69,7 +68,6 @@ app.register_blueprint(devices_bp)
app.register_blueprint(oidc_bp)
app.register_blueprint(scim_bp)
app.register_blueprint(v1_bp)
api.add_namespace(admin_ns)
app.config.update(
UPLOAD_FOLDER="inputs",
CELERY_BROKER_URL=settings.CELERY_BROKER_URL,