From 2ec3db81777234c7038c0d6a4edde5162fc1edc6 Mon Sep 17 00:00:00 2001 From: Mohammad Ashraful Islam Date: Wed, 1 Feb 2017 18:20:06 +0600 Subject: [PATCH] fixed url checker ':' to 'http' (#4678) --- rest_framework/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/test.py b/rest_framework/test.py index 241f94c91..87255bca0 100644 --- a/rest_framework/test.py +++ b/rest_framework/test.py @@ -114,7 +114,7 @@ if requests is not None: self.mount('https://', adapter) def request(self, method, url, *args, **kwargs): - if ':' not in url: + if not url.startswith('http'): raise ValueError('Missing "http:" or "https:". Use a fully qualified URL, eg "http://testserver%s"' % url) return super(RequestsClient, self).request(method, url, *args, **kwargs)