Suddenly started getting UnmockedError: No mocking was registered #10047
Unanswered
julianonunes
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Nothing jumps to the eyes looking at the code... any chance of providing a minimal reproducible example? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was changing my test to use the @pytest.mark.parametrize and after a few changes it starts crashing with the error "httpretty.errors.UnmockedError: No mocking was registered, and real connections are not allowed (httpretty.allow_net_connect = False).".
I checked the test results and at the beginning it mentions the MagicMock objects created, however the stack trace (and the debug process) shows that the mocker.patch seems to be ignored, as the real function is being called, instead of just returning what's on the
def search_tickets(mocker, new_ticket)
.What am I missing?
Here is a sample of my test:
Beta Was this translation helpful? Give feedback.
All reactions