Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.2.X] Fixed #15554 -- Corrected test failure in contenttypes when d…

…efault site isn't example.com. Thanks to twil for the report, and PaulM for the patch.

Backport of r15766 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15767 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ee31d7124f111d492882d36461e55a8e2d778896 1 parent 20cf3b8
@freakboy3742 freakboy3742 authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 django/contrib/contenttypes/tests.py
View
7 django/contrib/contenttypes/tests.py
@@ -63,9 +63,12 @@ def test_shortcut_view(self):
obj = User.objects.create(username="john")
if Site._meta.installed:
+ current_site = Site.objects.get_current()
response = shortcut(request, user_ct.id, obj.id)
- self.assertEqual("http://example.com/users/john/", response._headers.get("location")[1])
+ self.assertEqual("http://%s/users/john/" % current_site.domain,
+ response._headers.get("location")[1])
Site._meta.installed = False
response = shortcut(request, user_ct.id, obj.id)
- self.assertEqual("http://Example.com/users/john/", response._headers.get("location")[1])
+ self.assertEqual("http://Example.com/users/john/",
+ response._headers.get("location")[1])
Please sign in to comment.
Something went wrong with that request. Please try again.