mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-05 08:51:20 +00:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user