Files
stonks-oracle/tests/test_schemas.py
T
Celes Renata c85c0068a2 fix: clean up utcnow deprecation warnings, fix 12 failing tests, add CI/CD pipeline manifests
- Replace all datetime.utcnow() with datetime.now(tz=timezone.utc) across 8 files
- Fix 12 failing tests to match current implementation behavior
- Fix pytest_plugins in non-top-level conftest (moved to root conftest.py)
- Auto-fix 189 lint issues (import sorting, unused imports)
- Add CI/CD pipeline infrastructure (ARC, ArgoCD, Kargo manifests)
- Add values-beta.yaml and values-paper.yaml for staged deployments
- Update GitHub Actions workflow to use self-hosted-gremlin runners
- Add integration-test job to CI pipeline

Result: 1596 passed, 0 failed, 0 warnings
2026-04-18 03:59:28 +00:00

51 lines
1.2 KiB
Python

"""Basic smoke tests for shared schemas."""
from services.shared.schemas import (
ActionType,
CatalystType,
CompanyImpact,
DocumentIntelligence,
DocumentMetadata,
Recommendation,
Sentiment,
TrendSummary,
)
def test_document_intelligence_defaults():
di = DocumentIntelligence()
assert di.document_id
assert di.confidence == 0.5
assert di.companies == []
def test_company_impact_validation():
ci = CompanyImpact(
ticker="AAPL",
company_name="Apple Inc.",
relevance=0.9,
sentiment=Sentiment.POSITIVE,
impact_score=0.7,
impact_horizon="1d_30d",
catalyst_type=CatalystType.EARNINGS,
)
assert ci.ticker == "AAPL"
assert ci.sentiment == Sentiment.POSITIVE
def test_trend_summary_defaults():
ts = TrendSummary()
assert ts.trend_strength == 0.5
assert ts.contradiction_score == 0.0
def test_recommendation_defaults():
rec = Recommendation()
assert rec.action == ActionType.WATCH
assert rec.position_sizing.portfolio_pct == 0.02
def test_document_metadata_defaults():
dm = DocumentMetadata()
assert dm.document_id
assert dm.language == "en"