mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Fix typo, %t -> %r
This commit is contained in:
+1
-1
@@ -291,7 +291,7 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
|
||||
raise MissingSchema("Invalid URL %r: No schema supplied" % url)
|
||||
|
||||
if not host:
|
||||
raise InvalidURL("Invalid URL %t: No host supplied" % url)
|
||||
raise InvalidURL("Invalid URL %r: No host supplied" % url)
|
||||
|
||||
# Only want to apply IDNA to the hostname
|
||||
try:
|
||||
|
||||
+3
-1
@@ -14,6 +14,7 @@ from requests.auth import HTTPDigestAuth
|
||||
from requests.adapters import HTTPAdapter
|
||||
from requests.compat import str, cookielib
|
||||
from requests.cookies import cookiejar_from_dict
|
||||
from requests.exceptions import InvalidURL, MissingSchema
|
||||
from requests.structures import CaseInsensitiveDict
|
||||
|
||||
try:
|
||||
@@ -53,7 +54,8 @@ class RequestsTestCase(unittest.TestCase):
|
||||
requests.post
|
||||
|
||||
def test_invalid_url(self):
|
||||
self.assertRaises(ValueError, requests.get, 'hiwpefhipowhefopw')
|
||||
self.assertRaises(MissingSchema, requests.get, 'hiwpefhipowhefopw')
|
||||
self.assertRaises(InvalidURL, requests.get, 'http://')
|
||||
|
||||
def test_basic_building(self):
|
||||
req = requests.Request()
|
||||
|
||||
Reference in New Issue
Block a user