Skip to content

Commit 24b19c3

Browse files
committed
fixed url checker ':' to 'http'
1 parent 24791cb commit 24b19c3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rest_framework/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def __init__(self, *args, **kwargs):
114114
self.mount('https://', adapter)
115115

116116
def request(self, method, url, *args, **kwargs):
117-
if ':' not in url:
117+
if not url.startswith('http'):
118118
raise ValueError('Missing "http:" or "https:". Use a fully qualified URL, eg "http://testserver%s"' % url)
119119
return super(RequestsClient, self).request(method, url, *args, **kwargs)
120120

0 commit comments

Comments
 (0)