MCPcopy
hub / github.com/VibiumDev/vibium / test_request_method_headers

Function test_request_method_headers

tests/py/test_network_dialog.py:129–144  ·  view source on GitHub ↗
(net_browser, test_server)

Source from the content-addressed store, hash-verified

127
128
129async def test_request_method_headers(net_browser, test_server):
130 vibe = await net_browser.new_page()
131 await vibe.go(test_server + "/fetch")
132 captured = {}
133
134 def handler(req):
135 if "api/data" in req.url():
136 captured["method"] = req.method()
137 captured["headers"] = req.headers()
138
139 vibe.on_request(handler)
140 await vibe.evaluate("doFetch()")
141 await vibe.wait(500)
142 assert captured.get("method") == "GET"
143 assert isinstance(captured.get("headers"), dict)
144 await vibe.close()
145
146
147async def test_response_url_status(net_browser, test_server):

Callers

nothing calls this directly

Calls 7

getMethod · 0.80
new_pageMethod · 0.45
goMethod · 0.45
on_requestMethod · 0.45
evaluateMethod · 0.45
waitMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected