Ticket #15988: fix-contenttypes-test.2.diff

File fix-contenttypes-test.2.diff, 1.1 KB (added by anonymous, 13 years ago)

corrected typo

  • django/contrib/contenttypes/tests.py

    diff --git a/django/contrib/contenttypes/tests.py b/django/contrib/contenttypes/tests.py
    index b6b1c50..577dc36 100644
    a b class ContentTypesTests(TestCase):  
    6565
    6666        if Site._meta.installed:
    6767            current_site = Site.objects.get_current()
     68
     69            expected = "/users/john/"
     70            override = settings.ABSOLUTE_URL_OVERRIDES.get("%s.%s" % (obj._meta.app_label, obj._meta.module_name))
     71            if override:
     72                expected = override(obj)
     73
    6874            response = shortcut(request, user_ct.id, obj.id)
    69             self.assertEqual("http://%s/users/john/" % current_site.domain,
     75            self.assertEqual("http://%s%s" % (current_site.domain, expected),
    7076                             response._headers.get("location")[1])
    7177
    7278        Site._meta.installed = False
    7379        response = shortcut(request, user_ct.id, obj.id)
    74         self.assertEqual("http://Example.com/users/john/",
     80        self.assertEqual("http://Example.com%s" % expected,
    7581                         response._headers.get("location")[1])
Back to Top