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

Not sure why this is not working #386

Closed
jiz17043 opened this issue Oct 6, 2023 · 3 comments
Closed

Not sure why this is not working #386

jiz17043 opened this issue Oct 6, 2023 · 3 comments

Comments

@jiz17043
Copy link

jiz17043 commented Oct 6, 2023

image
image
Try to mock the response of the function in the httprequest_gecko module but it seems not working. Please let me know if you have any suggestions. Thank you!
I am using the latest versions of pytest (7.1.2) and pytest-mock (3.11.1) on Python 3.9.2.

@The-Compiler
Copy link
Member

Not sure off hand what the issue is, but looks like you're not even using pytest-mock in that screenshot - so this isn't an issue with the plugin.

@The-Compiler The-Compiler closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2023
@jiz17043
Copy link
Author

jiz17043 commented Oct 6, 2023

I would like to ask for any suggestions if I want to mock a function.

@nicoddemus
Copy link
Member

@jiz17043 see this section in the docs, as it is likely relevant:

https://docs.python.org/3/library/unittest.mock.html#where-to-patch

nicoddemus added a commit that referenced this issue Oct 6, 2023
As #386 shows, this is a common problem, so add a link to the docs to help users.
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

No branches or pull requests

3 participants