summaryrefslogtreecommitdiff
path: root/tests/regressiontests/requests/tests.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-08-23 17:28:12 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-08-23 17:28:12 +0000
commit646f2f6101cda3e20908928de44739dfff596b0f (patch)
tree81b62d46bd133d9850867e626fc95e6d03365ad3 /tests/regressiontests/requests/tests.py
parent3dd69a965b467a3085079a3628b18310a10f0261 (diff)
Fixed #7494 -- Fixed build_absolute_url() for some types of (uncommon) URLs.
Patch from tom@almostobsolete.net and RobotAdam. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8490 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/requests/tests.py')
-rw-r--r--tests/regressiontests/requests/tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/regressiontests/requests/tests.py b/tests/regressiontests/requests/tests.py
index a091113515..1615a73406 100644
--- a/tests/regressiontests/requests/tests.py
+++ b/tests/regressiontests/requests/tests.py
@@ -36,4 +36,12 @@ META:{}>
>>> from django.http import parse_cookie
>>> parse_cookie('invalid:key=true')
{}
+
+>>> request = HttpRequest()
+>>> print request.build_absolute_uri(location="https://www.example.com/asdf")
+https://www.example.com/asdf
+>>> request.get_host = lambda: 'www.example.com'
+>>> request.path = ''
+>>> print request.build_absolute_uri(location="/path/with:colons")
+http://www.example.com/path/with:colons
"""