mirror of
https://github.com/django/django.git
synced 2025-07-23 13:15:32 +00:00
Added more tests for HttpRequest.build_absolute_uri().
This commit is contained in:
parent
366451880a
commit
e2908ecb3e
1 changed files with 4 additions and 1 deletions
|
@ -797,8 +797,11 @@ class BuildAbsoluteURITests(SimpleTestCase):
|
|||
('http://example.com/?foo=bar', 'http://example.com/?foo=bar'),
|
||||
# A schema-relative URL
|
||||
('//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/bar/'),
|
||||
('///foo/bar/', 'http://testserver/foo/bar/'),
|
||||
)
|
||||
for location, expected_url in tests:
|
||||
with self.subTest(location=location):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue