Ticket #15554: sites_absolute_path_fix.diff

File sites_absolute_path_fix.diff, 796 bytes (added by Paul McMillan, 14 years ago)
  • django/contrib/contenttypes/tests.py

     
    6363        obj = User.objects.create(username="john")
    6464
    6565        if Site._meta.installed:
     66            current_site = Site.objects.get_current()
    6667            response = shortcut(request, user_ct.id, obj.id)
    67             self.assertEqual("http://example.com/users/john/", response._headers.get("location")[1])
     68            self.assertEqual("http://%s/users/john/" % current_site.domain,
     69                             response._headers.get("location")[1])
    6870
    6971        Site._meta.installed = False
    7072        response = shortcut(request, user_ct.id, obj.id)
Back to Top