mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 21:12:16 +00:00
[Feature]try to add fmp senate trading data api (#6957)
* [Feature] Add Government Trades * [BugFix] Supplement the missing files * [Enhancement] Fix branch goverment_trades * [Enhancement] Fix branch government_trades * Capture test cassettes. * [Enhancement] Fix branch government_trades * some style things and prevent page from exceeding 30 * black * linter again * else None instead of Other --------- Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
This commit is contained in:
@@ -2017,3 +2017,35 @@ def test_equity_discovery_latest_financial_reports(params, obb):
|
||||
assert result
|
||||
assert isinstance(result, OBBject)
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@parametrize(
|
||||
"params",
|
||||
[
|
||||
(
|
||||
{
|
||||
"chamber": "all",
|
||||
"symbol": "AAPL",
|
||||
"provider": "fmp",
|
||||
"limit": None,
|
||||
}
|
||||
),
|
||||
(
|
||||
{
|
||||
"symbol": None,
|
||||
"chamber": "all",
|
||||
"limit": 300,
|
||||
"provider": "fmp",
|
||||
}
|
||||
),
|
||||
],
|
||||
)
|
||||
@pytest.mark.integration
|
||||
def test_equity_ownership_government_trades(params, obb):
|
||||
"""Test the equity ownership government trades endpoint."""
|
||||
params = {p: v for p, v in params.items() if v}
|
||||
|
||||
result = obb.equity.ownership.government_trades(**params)
|
||||
assert result
|
||||
assert isinstance(result, OBBject)
|
||||
assert len(result.results) > 0
|
||||
|
||||
Reference in New Issue
Block a user