mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Rename {Missing,Invalid}Schema to *Scheme
Schemes are what they're called, not schemas. Conflicts: requests/models.py
This commit is contained in:
+5
-5
@@ -19,7 +19,7 @@ from requests.compat import (
|
||||
Morsel, cookielib, getproxies, str, urljoin, urlparse, is_py3, builtin_str)
|
||||
from requests.cookies import cookiejar_from_dict, morsel_to_cookie
|
||||
from requests.exceptions import (ConnectionError, ConnectTimeout,
|
||||
InvalidSchema, InvalidURL, MissingSchema,
|
||||
InvalidScheme, InvalidURL, MissingScheme,
|
||||
ReadTimeout, Timeout, RetryError)
|
||||
from requests.models import PreparedRequest
|
||||
from requests.structures import CaseInsensitiveDict
|
||||
@@ -77,13 +77,13 @@ class RequestsTestCase(unittest.TestCase):
|
||||
requests.post
|
||||
|
||||
def test_invalid_url(self):
|
||||
with pytest.raises(MissingSchema):
|
||||
with pytest.raises(MissingScheme):
|
||||
requests.get('hiwpefhipowhefopw')
|
||||
with pytest.raises(InvalidSchema):
|
||||
with pytest.raises(InvalidScheme):
|
||||
requests.get('localhost:3128')
|
||||
with pytest.raises(InvalidSchema):
|
||||
with pytest.raises(InvalidScheme):
|
||||
requests.get('localhost.localdomain:3128/')
|
||||
with pytest.raises(InvalidSchema):
|
||||
with pytest.raises(InvalidScheme):
|
||||
requests.get('10.122.1.1:3128/')
|
||||
with pytest.raises(InvalidURL):
|
||||
requests.get('http://')
|
||||
|
||||
Reference in New Issue
Block a user