Skip to content

fix: fulfill with json#1700

Merged
rwoll merged 1 commit into
microsoft:mainfrom
rwoll:fix/json
Dec 29, 2022
Merged

fix: fulfill with json#1700
rwoll merged 1 commit into
microsoft:mainfrom
rwoll:fix/json

Conversation

@rwoll
Copy link
Copy Markdown
Member

@rwoll rwoll commented Dec 29, 2022

Resolves #1693.

Relates microsoft/playwright#19184 (original upstream change).
Relates #1684 (original Python rolling introducing the feature to the port).

import base64
import inspect
import json
import json as json_utils
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This definitely works, but perhaps there is a more idiomatic and future proof approach. The original issue was missed since the parameter is/was typed as Any so json.dumps was valid from the typechecker's perspective, but in reality was wrong since json shadowed and referred to the method's parameter.

@rwoll rwoll merged commit 334c279 into microsoft:main Dec 29, 2022
rwoll added a commit to rwoll/playwright-python that referenced this pull request Dec 29, 2022
Resolves microsoft#1693.

Relates microsoft/playwright#19184 (original upstream change).
Relates microsoft#1684 (original Python rolling introducing the feature to the port).
rwoll added a commit that referenced this pull request Dec 29, 2022
fix: fulfill with json (#1700)

Resolves #1693.

Relates microsoft/playwright#19184 (original upstream change).
Relates #1684 (original Python rolling introducing the feature to the port).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Now work mocking with route.fulfill json

2 participants