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
This commit is contained in:
@@ -4,7 +4,6 @@ Validates request building, response parsing, and error handling.
|
||||
"""
|
||||
from services.adapters.filings_adapter import FilingsDataAdapter, SECEdgarAdapter
|
||||
|
||||
|
||||
# --- Fake EDGAR EFTS responses ---
|
||||
|
||||
EFTS_RESPONSE = {
|
||||
@@ -14,30 +13,48 @@ EFTS_RESPONSE = {
|
||||
{
|
||||
"_id": "0001234567-26-000001",
|
||||
"_source": {
|
||||
"adsh": "0001234567-26-000001",
|
||||
"ciks": ["0000320193"],
|
||||
"file_date": "2026-04-01",
|
||||
"form": "8-K",
|
||||
"form_type": "8-K",
|
||||
"display_names": ["Apple Inc. (CIK 0000320193)"],
|
||||
"entity_name": "Apple Inc.",
|
||||
"file_num": "001-36743",
|
||||
"file_type": "HTML",
|
||||
"file_description": "Current Report",
|
||||
"period_of_report": "2026-03-31",
|
||||
},
|
||||
},
|
||||
{
|
||||
"_id": "0001234567-26-000002",
|
||||
"_source": {
|
||||
"adsh": "0001234567-26-000002",
|
||||
"ciks": ["0000320193"],
|
||||
"file_date": "2026-03-15",
|
||||
"form": "10-Q",
|
||||
"form_type": "10-Q",
|
||||
"display_names": ["Apple Inc. (CIK 0000320193)"],
|
||||
"entity_name": "Apple Inc.",
|
||||
"file_num": "001-36743",
|
||||
"file_type": "HTML",
|
||||
"file_description": "Quarterly Report",
|
||||
"period_of_report": "2026-03-15",
|
||||
},
|
||||
},
|
||||
{
|
||||
"_id": "0001234567-26-000003",
|
||||
"_source": {
|
||||
"adsh": "0001234567-26-000003",
|
||||
"ciks": ["0000320193"],
|
||||
"file_date": "2026-01-30",
|
||||
"form": "10-K",
|
||||
"form_type": "10-K",
|
||||
"display_names": ["Apple Inc. (CIK 0000320193)"],
|
||||
"entity_name": "Apple Inc.",
|
||||
"file_num": "001-36743",
|
||||
"file_type": "HTML",
|
||||
"file_description": "Annual Report",
|
||||
"period_of_report": "2025-12-31",
|
||||
},
|
||||
},
|
||||
@@ -119,8 +136,8 @@ class TestSECEdgarExtractItems:
|
||||
def test_extract_filings(self):
|
||||
items = self.adapter._extract_items(EFTS_RESPONSE)
|
||||
assert len(items) == 3
|
||||
assert items[0]["_id"] == "0001234567-26-000001"
|
||||
assert items[0]["_source"]["form_type"] == "8-K"
|
||||
assert items[0]["adsh"] == "0001234567-26-000001"
|
||||
assert items[0]["form"] == "8-K"
|
||||
|
||||
def test_extract_empty_results(self):
|
||||
items = self.adapter._extract_items(EMPTY_EFTS_RESPONSE)
|
||||
|
||||
Reference in New Issue
Block a user