add full support for AsyncIterator response type for streaming output (#7530)

This commit is contained in:
Danglewood
2026-06-22 14:35:55 -07:00
committed by GitHub
parent 6ca062bf86
commit 4bcf8441bc
31 changed files with 2601 additions and 78 deletions

View File

@@ -136,3 +136,27 @@ def test_custom_groups_from_reference_pulls_route_when_present():
reference={"/plain/hello": {"some": "reference-data"}},
)
rp_class.assert_called()
def test_custom_groups_from_reference_matches_underscore_namespace():
"""A namespace name containing ``_`` (e.g. binance_stream) resolves correctly."""
fake_rp = MagicMock()
fake_rp.custom_groups = {"/binance_stream/book_ticker": ["grp"]}
saved = ArgparseClassProcessor._reference
ArgparseClassProcessor._reference = {
"/binance_stream/book_ticker": {"parameters": {}}
}
try:
with patch(
"openbb_cli.argparse_translator.argparse_class_processor.ReferenceToArgumentsProcessor",
return_value=fake_rp,
) as rp_class:
out = ArgparseClassProcessor._custom_groups_from_reference(
"binance_stream", "book_ticker"
)
rp_class.assert_called_once_with(
{"/binance_stream/book_ticker": {"parameters": {}}}
)
assert out == ["grp"]
finally:
ArgparseClassProcessor._reference = saved