-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Allow local urls #303
Comments
allowing a whitelist of hostnames would be nice (so it could work in a containerized environment) |
There is some progress on this? I am trying to mock a request to JIRA API but I need to allow local requests to an internal server. I am having a
|
I am also interested in this. We need to block all outgoing requests to 3rd-party APIs whilst allowing requests to Elasticsearch. A whitelist of hostnames as @timc13 suggested, would solve this. |
@gabrielfalcao I am working on a MR for this. So far it works for my need, but my test case hangs. I feel I am missing something. Could you point me to the right direction? Here is the feature branch on my fork. |
Allow a whitelist of addresses to access the network. Pass a list of tuples `(host, port)` as `whitelist` argument.
I figured out how to fix the test and I have submitted a PR #448 . |
Hi,
I'd like to use httpretty to speed up my tests as we have some lookups to googleapis and others.
Is it possible set
allow_net_connect = False
, mock the desired requests with fixtures and still allow some urls, such as a local Elastic Search server?This is what my TestCase looks like:
The text was updated successfully, but these errors were encountered: