mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-30 05:03:54 +00:00
fix(government_us): amendment text viewer opens on an amendment that has text (#7850)
House amendments carry no published text, so the default 119-hamdt-2 opened an empty viewer. The default is now 119-samdt-2. Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com> Co-authored-by: dlee-bq <dlee@brightquery.com>
This commit is contained in:
@@ -584,12 +584,12 @@ async def amendments(
|
||||
},
|
||||
{
|
||||
"label": "Amendment ID",
|
||||
"description": "Enter an amendment id (e.g. '119-hamdt-2'), or group"
|
||||
"description": "Enter an amendment id (e.g. '119-samdt-2'), or group"
|
||||
+ " the 'Congressional Amendments' widget by 'Amendment ID' and"
|
||||
+ " click a cell.",
|
||||
"show": True,
|
||||
"paramName": "amendment_id",
|
||||
"value": "119-hamdt-2",
|
||||
"value": "119-samdt-2",
|
||||
},
|
||||
],
|
||||
"refetchInterval": False,
|
||||
|
||||
@@ -372,3 +372,14 @@ class TestNoDuplicatePlacements:
|
||||
if widget["i"] not in ids
|
||||
]
|
||||
assert not offenders, f"layout references unbuilt widgets: {offenders}"
|
||||
|
||||
|
||||
def test_amendment_text_viewer_opens_on_an_amendment_with_text(built):
|
||||
"""House amendments carry no published text, so the default is a Senate one."""
|
||||
config = next(
|
||||
config
|
||||
for _, widget_id, config in built
|
||||
if widget_id == "uscongress_amendment_text_congress_gov_obb"
|
||||
)
|
||||
values = {p["paramName"]: p.get("value") for p in config["params"]}
|
||||
assert values["amendment_id"] == "119-samdt-2"
|
||||
|
||||
Reference in New Issue
Block a user