7a0da7932b
Backwards Compatibility / Verify Encryption Constants (push) Waiting to run
Backwards Compatibility / PyPI Version Compatibility (push) Waiting to run
Backwards Compatibility / Database Migration Tests (push) Waiting to run
CodeQL Advanced / Analyze (javascript-typescript) (push) Waiting to run
CodeQL Advanced / Analyze (python) (push) Waiting to run
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-form] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-metrics] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [research-workflow] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [settings-core] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [settings-pages] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [history-news] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [library] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [link-analytics] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [mobile] (push) Blocked by required conditions
Docker Tests (Consolidated) / detect-changes (push) Waiting to run
Docker Tests (Consolidated) / Build Test Image (push) Waiting to run
Docker Tests (Consolidated) / All Pytest Tests + Coverage (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [accessibility] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [api-crud] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-login] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-pages] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [auth-register] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [chat-core] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [chat-lifecycle] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) [error-benchmark] (push) Blocked by required conditions
Docker Tests (Consolidated) / UI Tests (Puppeteer) (push) Blocked by required conditions
Docker Tests (Consolidated) / Accessibility Tests (push) Blocked by required conditions
Docker Tests (Consolidated) / LLM Unit Tests (push) Blocked by required conditions
Docker Tests (Consolidated) / LLM Example Tests (push) Blocked by required conditions
Docker Tests (Consolidated) / Production Image Smoke Test (push) Blocked by required conditions
Docker Tests (Consolidated) / Infrastructure Tests (push) Blocked by required conditions
OSSF Scorecard / OSSF Security Scorecard Analysis (push) Waiting to run
OSV-Scanner (Scheduled) / scan-scheduled (push) Failing after 0s
Create Release / test-gate (push) Has been cancelled
Create Release / release-gate (push) Has been cancelled
Create Release / ci-gate (push) Has been cancelled
Create Release / version-check (push) Has been cancelled
Create Release / e2e-test-gate (push) Has been cancelled
Create Release / responsive-test-gate (push) Has been cancelled
Create Release / compat-test-gate (push) Has been cancelled
Create Release / compose-integration-gate (push) Has been cancelled
Create Release / vulture-gate (push) Has been cancelled
Create Release / build (push) Has been cancelled
Create Release / provenance (push) Has been cancelled
Create Release / prerelease-docker (push) Has been cancelled
Create Release / publish-docker (push) Has been cancelled
Create Release / create-release (push) Has been cancelled
Create Release / cleanup-changelog (push) Has been cancelled
Create Release / trigger-pypi (push) Has been cancelled
Create Release / monitor-pypi (push) Has been cancelled
Create Release / Clean up orphan prerelease tags and signatures (push) Has been cancelled
72 lines
2.2 KiB
Python
72 lines
2.2 KiB
Python
#!/usr/bin/env python3
|
|
"""Test that all models are properly consolidated in the database.models package."""
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
sys.path.insert(
|
|
0,
|
|
str(Path(__file__).parent.parent.parent.resolve()),
|
|
)
|
|
|
|
|
|
def test_all_models_importable():
|
|
"""Test that all models can be imported from the consolidated location."""
|
|
# This should not raise any ImportError
|
|
from local_deep_research.database.models import (
|
|
Base,
|
|
BenchmarkRun,
|
|
# Benchmark
|
|
ResearchHistory,
|
|
User,
|
|
)
|
|
|
|
# If we get here, all imports worked
|
|
assert Base is not None
|
|
assert User is not None
|
|
assert BenchmarkRun is not None
|
|
assert ResearchHistory is not None
|
|
print("✓ All models successfully imported from consolidated location")
|
|
|
|
|
|
def test_benchmark_models_relationships():
|
|
"""Test that benchmark model relationships are properly defined."""
|
|
from local_deep_research.database.models import (
|
|
BenchmarkProgress,
|
|
BenchmarkResult,
|
|
BenchmarkRun,
|
|
)
|
|
|
|
# Check that relationships are defined
|
|
assert hasattr(BenchmarkRun, "results")
|
|
assert hasattr(BenchmarkRun, "progress_updates")
|
|
assert hasattr(BenchmarkResult, "benchmark_run")
|
|
assert hasattr(BenchmarkProgress, "benchmark_run")
|
|
print("✓ Benchmark model relationships properly defined")
|
|
|
|
|
|
def test_research_models_have_correct_columns():
|
|
"""Test that research models have the expected columns after consolidation."""
|
|
from local_deep_research.database.models import (
|
|
ResearchHistory,
|
|
ResearchResource,
|
|
)
|
|
|
|
# Check ResearchHistory has renamed metadata column
|
|
assert hasattr(ResearchHistory, "research_meta")
|
|
assert hasattr(ResearchHistory, "query")
|
|
assert hasattr(ResearchHistory, "status")
|
|
|
|
# Check ResearchResource has renamed metadata column
|
|
assert hasattr(ResearchResource, "resource_metadata")
|
|
assert hasattr(ResearchResource, "title")
|
|
assert hasattr(ResearchResource, "url")
|
|
print("✓ Research models have correct column names")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
test_all_models_importable()
|
|
test_benchmark_models_relationships()
|
|
test_research_models_have_correct_columns()
|
|
print("\n✅ All model consolidation tests passed!")
|