Closed ento closed 5 months ago
Hi @ento, please have a look at the PR I published before I actually merge it. I'll publish a new version straight after merging it.
By the way, I invited you to join the project as collaborator. Let me know if you like the idea.
I've just merged the PR, I hope you like the way I ended up refactoring your proposal. This is the new release shipping the feature you proposed: https://pypi.org/project/mocket/3.12.4/
I'm trying to use a library that sends test stats to a remote server in the background [1], and tests that use Mocket in strict mode would fail intermittently when the library tries to make an HTTP request. I'd like to use strict mode to ensure no unexpected requests are made against the service a test is testing, while allowing test stats to be sent to the remote server.
A similar feature is supported (or may get supported) by some other libraries for mocking out HTTP requests when testing:
disable_net_connect!
method takes anallow
argument[1]: ddtrace, which sends telemetry data to Datadog's CI Visibility intake server