diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-09-28 20:10:22 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-09-28 20:33:05 +0200 |
| commit | 6c2faaceb0482267cec19da0ff432984028f9d0c (patch) | |
| tree | 5d62d1d3e058282c5bc7aa4c416c3b458f10d76c /django/contrib/contenttypes | |
| parent | 1cd6e04cd4f768bcd4385b75de433d497d938f82 (diff) | |
Made more extensive use of get_current_site
Refs #15089
Diffstat (limited to 'django/contrib/contenttypes')
| -rw-r--r-- | django/contrib/contenttypes/tests.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/django/contrib/contenttypes/tests.py b/django/contrib/contenttypes/tests.py index 2f92a34581..10311fae92 100644 --- a/django/contrib/contenttypes/tests.py +++ b/django/contrib/contenttypes/tests.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.views import shortcut -from django.contrib.sites.models import Site +from django.contrib.sites.models import Site, get_current_site from django.http import HttpRequest, Http404 from django.test import TestCase from django.utils.http import urlquote @@ -219,9 +219,8 @@ class ContentTypesTests(TestCase): obj = FooWithUrl.objects.create(name="john") if Site._meta.installed: - current_site = Site.objects.get_current() response = shortcut(request, user_ct.id, obj.id) - self.assertEqual("http://%s/users/john/" % current_site.domain, + self.assertEqual("http://%s/users/john/" % get_current_site(request).domain, response._headers.get("location")[1]) Site._meta.installed = False |
