Make tests fail: add "%20!=" part to userinfo which is allowed as per RFC3986
This commit is contained in:
parent
6b8e178e1e
commit
028d1db0b4
|
@ -56,7 +56,7 @@ class BaseTestParsesURIs:
|
|||
assert uri.path is None
|
||||
assert uri.query is None
|
||||
assert uri.fragment is None
|
||||
assert uri.userinfo == 'user:pass'
|
||||
assert uri.userinfo == 'user%20!=:pass'
|
||||
|
||||
def test_handles_basic_uri_with_path(self, basic_uri_with_path):
|
||||
"""Test that self.test_class can handle a URI with a path."""
|
||||
|
@ -93,7 +93,7 @@ class BaseTestParsesURIs:
|
|||
assert uri.path == '/path/to/resource'
|
||||
assert uri.query == 'key=value'
|
||||
assert uri.fragment == 'fragment'
|
||||
assert uri.userinfo == 'user:pass'
|
||||
assert uri.userinfo == 'user%20!=:pass'
|
||||
assert str(uri.port) == '443'
|
||||
|
||||
def test_handles_relative_uri(self, relative_uri):
|
||||
|
|
|
@ -77,7 +77,7 @@ def basic_uri_with_port(request):
|
|||
|
||||
@pytest.fixture(params=valid_hosts)
|
||||
def uri_with_port_and_userinfo(request):
|
||||
return 'ssh://user:pass@%s:22' % request.param
|
||||
return 'ssh://%s@%s:22' % ('user%20!=:pass', request.param)
|
||||
|
||||
|
||||
@pytest.fixture(params=valid_hosts)
|
||||
|
@ -92,8 +92,8 @@ def uri_with_path_and_query(request):
|
|||
|
||||
@pytest.fixture(params=valid_hosts)
|
||||
def uri_with_everything(request):
|
||||
return 'https://user:pass@%s:443/path/to/resource?key=value#fragment' % (
|
||||
request.param)
|
||||
return 'https://%s@%s:443/path/to/resource?key=value#fragment' % (
|
||||
'user%20!=:pass', request.param)
|
||||
|
||||
|
||||
@pytest.fixture(params=valid_hosts)
|
||||
|
|
|
@ -113,7 +113,7 @@ class TestParseResultBytes:
|
|||
assert uri.path == b'/path/to/resource'
|
||||
assert uri.query == b'key=value'
|
||||
assert uri.fragment == b'fragment'
|
||||
assert uri.userinfo == b'user:pass'
|
||||
assert uri.userinfo == b'user%20!=:pass'
|
||||
assert uri.port == 443
|
||||
assert isinstance(uri.authority, bytes) is True
|
||||
|
||||
|
|
Loading…
Reference in New Issue