Skip to content

Commit 026a158

Browse files
committed
Added missing interception test
1 parent 4b6e8d1 commit 026a158

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/async/test_request_intercept.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,17 @@ async def test_should_give_access_to_the_intercepted_response_body(
175175
route.fulfill(response=response),
176176
eval_task,
177177
)
178+
179+
180+
async def test_should_intercept_by_glob(page: Page, server: Server) -> None:
181+
await page.goto(server.EMPTY_PAGE)
182+
await page.route(
183+
"http://localhos**?*oo",
184+
lambda route: route.fulfill(body="intercepted", status=200),
185+
)
186+
187+
result = await page.evaluate(
188+
"url => fetch(url).then(r => r.text())", server.PREFIX + "/?foo"
189+
)
190+
191+
assert result == "intercepted"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy