Skip to content

Commit 5c54b22

Browse files
authored
Drop redundant requests adapter (encode#4639)
1 parent 7eb6cdc commit 5c54b22

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

rest_framework/test.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,6 @@ def start_response(wsgi_status, wsgi_headers):
106106
def close(self):
107107
pass
108108

109-
class NoExternalRequestsAdapter(requests.adapters.HTTPAdapter):
110-
def send(self, request, *args, **kwargs):
111-
msg = (
112-
'RequestsClient refusing to make an outgoing network request '
113-
'to "%s". Only "testserver" or hostnames in your ALLOWED_HOSTS '
114-
'setting are valid.' % request.url
115-
)
116-
raise RuntimeError(msg)
117-
118109
class RequestsClient(requests.Session):
119110
def __init__(self, *args, **kwargs):
120111
super(RequestsClient, self).__init__(*args, **kwargs)

0 commit comments

Comments
 (0)