File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,16 @@ def __init__(self):
3737 self .scrape = _AsyncScrapeManager ()
3838
3939
40+ class _AsyncExtractManager :
41+ async def start_and_wait (self , params ):
42+ return _Response ({"ok" : True })
43+
44+
45+ class _AsyncExtractClient :
46+ def __init__ (self ):
47+ self .extract = _AsyncExtractManager ()
48+
49+
4050def test_tool_wrappers_accept_mapping_inputs ():
4151 client = _Client ()
4252 params = MappingProxyType ({"url" : "https://example.com" })
@@ -77,4 +87,11 @@ async def run() -> None:
7787 ["https://example.com" ], # type: ignore[arg-type]
7888 )
7989
90+ extract_client = _AsyncExtractClient ()
91+ with pytest .raises (HyperbrowserError , match = "tool params must be a mapping" ):
92+ await WebsiteExtractTool .async_runnable (
93+ extract_client ,
94+ "bad" , # type: ignore[arg-type]
95+ )
96+
8097 asyncio .run (run ())
You can’t perform that action at this time.
0 commit comments