Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fulfill with json #1700

Merged
merged 1 commit into from
Dec 29, 2022
Merged

fix: fulfill with json #1700

merged 1 commit into from
Dec 29, 2022

Conversation

rwoll
Copy link
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).

@@ -16,6 +16,7 @@
import base64
import inspect
import json
import json as json_utils
Copy link
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