Files
orion/models/database/__init__.py
Samir Boulahtit e3a10b4a53 feat: add pytest testing dashboard with run history and statistics
Add a new Testing Dashboard page that replaces the old Testing Hub with
pytest integration:

- Database models for test runs, results, and collections (TestRun,
  TestResult, TestCollection)
- Test runner service that executes pytest with JSON reporting and
  stores results in the database
- REST API endpoints for running tests, viewing history, and statistics
- Dashboard UI showing pass rates, trends, tests by category, and top
  failing tests
- Alembic migration for the new test_* tables

The dashboard allows admins to:
- Run pytest directly from the UI
- View test run history with pass/fail statistics
- See trend data across recent runs
- Identify frequently failing tests
- Collect test information without running

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 23:04:41 +01:00

86 lines
1.9 KiB
Python

# models/database/__init__.py
"""Database models package."""
from .admin import (
AdminAuditLog,
AdminNotification,
AdminSession,
AdminSetting,
PlatformAlert,
)
from .architecture_scan import (
ArchitectureScan,
ArchitectureViolation,
ViolationAssignment,
ViolationComment,
)
from .test_run import TestCollection, TestResult, TestRun
from .base import Base
from .company import Company
from .content_page import ContentPage
from .customer import Customer, CustomerAddress
from .inventory import Inventory
from .marketplace_import_job import MarketplaceImportJob
from .marketplace_product import (
DigitalDeliveryMethod,
MarketplaceProduct,
ProductType,
)
from .marketplace_product_translation import MarketplaceProductTranslation
from .order import Order, OrderItem
from .product import Product
from .product_translation import ProductTranslation
from .user import User
from .vendor import Role, Vendor, VendorUser
from .vendor_domain import VendorDomain
from .vendor_theme import VendorTheme
__all__ = [
# Admin-specific models
"AdminAuditLog",
"AdminNotification",
"AdminSetting",
"PlatformAlert",
"AdminSession",
# Architecture/Code Quality
"ArchitectureScan",
"ArchitectureViolation",
"ViolationAssignment",
"ViolationComment",
# Test Runs
"TestRun",
"TestResult",
"TestCollection",
# Base
"Base",
# User & Auth
"User",
# Company & Vendor
"Company",
"Vendor",
"VendorUser",
"Role",
"VendorDomain",
"VendorTheme",
# Content
"ContentPage",
# Customer
"Customer",
"CustomerAddress",
# Product - Enums
"ProductType",
"DigitalDeliveryMethod",
# Product - Models
"MarketplaceProduct",
"MarketplaceProductTranslation",
"Product",
"ProductTranslation",
# Import
"MarketplaceImportJob",
# Inventory
"Inventory",
# Orders
"Order",
"OrderItem",
]