summaryrefslogtreecommitdiff
path: root/django/contrib/contenttypes/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/contrib/contenttypes/tests.py')
-rw-r--r--django/contrib/contenttypes/tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/contrib/contenttypes/tests.py b/django/contrib/contenttypes/tests.py
index 3f648bd456..b73307d85f 100644
--- a/django/contrib/contenttypes/tests.py
+++ b/django/contrib/contenttypes/tests.py
@@ -15,10 +15,12 @@ from django.utils.encoding import python_2_unicode_compatible
class ConcreteModel(models.Model):
name = models.CharField(max_length=10)
+
class ProxyModel(ConcreteModel):
class Meta:
proxy = True
+
@python_2_unicode_compatible
class FooWithoutUrl(models.Model):
"""
@@ -39,6 +41,7 @@ class FooWithUrl(FooWithoutUrl):
def get_absolute_url(self):
return "/users/%s/" % urlquote(self.name)
+
class FooWithBrokenAbsoluteUrl(FooWithoutUrl):
"""
Fake model defining a ``get_absolute_url`` method containing an error
@@ -47,8 +50,8 @@ class FooWithBrokenAbsoluteUrl(FooWithoutUrl):
def get_absolute_url(self):
return "/users/%s/" % self.unknown_field
-class ContentTypesTests(TestCase):
+class ContentTypesTests(TestCase):
def setUp(self):
self.old_Site_meta_installed = Site._meta.installed
ContentType.objects.clear_cache()