[Feature] Compare Company Facts (SEC) (#6444)

* stashing

* more stashing

* add tests

* black

* test params

* mypy

* more mypy

* grammar police

* grammar police
This commit is contained in:
Danglewood
2024-05-21 00:56:53 -07:00
committed by GitHub
parent bffd88f96c
commit bf20807424
12 changed files with 6924 additions and 329 deletions

View File

@@ -1877,3 +1877,41 @@ def test_equity_estimates_forward_pe(params, obb):
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
@parametrize(
"params",
[
(
{
"provider": "sec",
"symbol": "NVDA,AAPL,AMZN,MSFT,GOOG,SMCI",
"fact": "RevenueFromContractWithCustomerExcludingAssessedTax",
"year": 2024,
"fiscal_period": None,
"instantaneous": False,
"use_cache": False,
}
),
(
{
"provider": "sec",
"symbol": None,
"fact": None,
"year": None,
"fiscal_period": None,
"instantaneous": False,
"use_cache": False,
}
),
],
)
@pytest.mark.integration
def test_equity_compare_company_facts(params, obb):
"""Test the equity compare company_facts endpoint."""
params = {p: v for p, v in params.items() if v}
result = obb.equity.compare.company_facts(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0