diff --git a/docs/src/mock.md b/docs/src/mock.md index 563dd8e6bb..ee00410b79 100644 --- a/docs/src/mock.md +++ b/docs/src/mock.md @@ -135,7 +135,7 @@ test('gets the json from api and adds a new fruit', async ({ page }) => { ```python async async def test_gets_the_json_from_api_and_adds_a_new_fruit(page: Page): async def handle(route: Route): - response = await route.fulfill() + response = await route.fetch() json = await response.json() json.append({ "name": "Playwright", "id": 100}) # Fulfill using the original response, while patching the response body @@ -154,7 +154,7 @@ async def test_gets_the_json_from_api_and_adds_a_new_fruit(page: Page): ```python sync def test_gets_the_json_from_api_and_adds_a_new_fruit(page: Page): def handle(route: Route): - response = route.fulfill() + response = route.fetch() json = response.json() json.append({ "name": "Playwright", "id": 100}) # Fulfill using the original response, while patching the response body