1
0
mirror of https://github.com/django/django.git synced 2024-12-23 09:36:06 +00:00

Added more tests for HttpRequest.build_absolute_uri().

This commit is contained in:
George-Cristian Bîrzan 2018-01-10 10:59:10 -05:00 committed by Tim Graham
parent 366451880a
commit e2908ecb3e

View File

@ -797,8 +797,11 @@ class BuildAbsoluteURITests(SimpleTestCase):
('http://example.com/?foo=bar', 'http://example.com/?foo=bar'), ('http://example.com/?foo=bar', 'http://example.com/?foo=bar'),
# A schema-relative URL # A schema-relative URL
('//example.com/?foo=bar', 'http://example.com/?foo=bar'), ('//example.com/?foo=bar', 'http://example.com/?foo=bar'),
# A relative URL # Relative URLs
('/foo/bar/', 'http://testserver/foo/bar/'), ('/foo/bar/', 'http://testserver/foo/bar/'),
('/foo/./bar/', 'http://testserver/foo/bar/'),
('/foo/../bar/', 'http://testserver/bar/'),
('///foo/bar/', 'http://testserver/foo/bar/'),
) )
for location, expected_url in tests: for location, expected_url in tests:
with self.subTest(location=location): with self.subTest(location=location):