Ticket #14543: patch.diff
File patch.diff, 1.3 KB (added by , 14 years ago) |
---|
-
django/contrib/contenttypes/tests.py
3 3 from django.contrib.contenttypes.models import ContentType 4 4 from django.contrib.sites.models import Site 5 5 from django.contrib.contenttypes.views import shortcut 6 from django.co re.exceptions import ObjectDoesNotExist6 from django.contrib.auth.models import User 7 7 from django.http import HttpRequest 8 8 from django.test import TestCase 9 from django.utils import unittest 9 10 10 11 11 class ContentTypesTests(TestCase): 12 12 13 13 def setUp(self): … … 46 46 len(db.connection.queries) 47 47 self.assertEqual(2, len(db.connection.queries)) 48 48 49 @unittest.skipUnless(User._meta.installed, "Requires Auth app") 49 50 def test_shortcut_view(self): 50 51 """ 51 52 Check that the shortcut view (used for the admin "view on site" … … 58 59 "SERVER_NAME": "Example.com", 59 60 "SERVER_PORT": "80", 60 61 } 61 from django.contrib.auth.models import User62 62 user_ct = ContentType.objects.get_for_model(User) 63 63 obj = User.objects.create(username="john") 64 64 Site._meta.installed = True