feat(sdk): API-Referenz Frontend + Backend-Konsolidierung (Shared Utilities, CRUD Factory)
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 32s
CI / test-python-backend-compliance (push) Successful in 30s
CI / test-python-document-crawler (push) Successful in 21s
CI / test-python-dsms-gateway (push) Successful in 18s
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 32s
CI / test-python-backend-compliance (push) Successful in 30s
CI / test-python-document-crawler (push) Successful in 21s
CI / test-python-dsms-gateway (push) Successful in 18s
- API-Referenz Seite (/sdk/api-docs) mit ~690 Endpoints, Suche, Filter, Modul-Index - Shared db_utils.py (row_to_dict) + tenant_utils Integration in 6 Route-Dateien - CRUD Factory (crud_factory.py) fuer zukuenftige Module - Version-Route Auto-Registration in versioning_utils.py - 1338 Tests bestanden, -232 Zeilen Duplikat-Code Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,13 +10,13 @@ from fastapi import FastAPI
|
||||
from compliance.api.legal_template_routes import (
|
||||
LegalTemplateCreate,
|
||||
LegalTemplateUpdate,
|
||||
_row_to_dict,
|
||||
_get_tenant_id,
|
||||
DEFAULT_TENANT_ID,
|
||||
VALID_DOCUMENT_TYPES,
|
||||
VALID_STATUSES,
|
||||
router,
|
||||
)
|
||||
from compliance.api.db_utils import row_to_dict as _row_to_dict
|
||||
|
||||
DEFAULT_TENANT_ID = "9282a473-5c95-4b3a-bf78-0ecc0ec71d3e"
|
||||
from classroom_engine.database import get_db
|
||||
|
||||
app = FastAPI()
|
||||
@@ -205,22 +205,6 @@ class TestLegalTemplateDB:
|
||||
assert isinstance(result["placeholders"], list)
|
||||
assert "{{COMPANY_NAME}}" in result["placeholders"]
|
||||
|
||||
def test_get_tenant_id_default(self):
|
||||
"""_get_tenant_id returns default when no header provided."""
|
||||
result = _get_tenant_id(None)
|
||||
assert result == DEFAULT_TENANT_ID
|
||||
|
||||
def test_get_tenant_id_valid_uuid(self):
|
||||
"""_get_tenant_id returns provided UUID when valid."""
|
||||
custom_uuid = "12345678-1234-1234-1234-123456789abc"
|
||||
result = _get_tenant_id(custom_uuid)
|
||||
assert result == custom_uuid
|
||||
|
||||
def test_get_tenant_id_invalid_uuid(self):
|
||||
"""_get_tenant_id falls back to default for invalid UUID."""
|
||||
result = _get_tenant_id("not-a-uuid")
|
||||
assert result == DEFAULT_TENANT_ID
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# TestLegalTemplateSearch
|
||||
|
||||
Reference in New Issue
Block a user