summaryrefslogtreecommitdiff
path: root/tests/model_inheritance_same_model_name/tests.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-04-21 11:41:30 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-04-21 11:43:08 +0200
commit3f76339355c1fe550dedf676feddd42a5d48be58 (patch)
tree0498fa3033274e74addeb5df5462663b539df6ad /tests/model_inheritance_same_model_name/tests.py
parent471fb04a307870794e3cefb1177405b506ee1a0a (diff)
Fixed #22402 -- Consolidated model_inheritance tests.
The model_inheritance_same_model_name tests couldn't be run without the model_inheritance tests. Make the problem go away by merging them. Thanks timo for the report.
Diffstat (limited to 'tests/model_inheritance_same_model_name/tests.py')
-rw-r--r--tests/model_inheritance_same_model_name/tests.py36
1 files changed, 0 insertions, 36 deletions
diff --git a/tests/model_inheritance_same_model_name/tests.py b/tests/model_inheritance_same_model_name/tests.py
deleted file mode 100644
index fe1fb0cdd2..0000000000
--- a/tests/model_inheritance_same_model_name/tests.py
+++ /dev/null
@@ -1,36 +0,0 @@
-from __future__ import unicode_literals
-
-from django.test import TestCase
-
-from model_inheritance.models import Title
-
-
-class InheritanceSameModelNameTests(TestCase):
-
- def setUp(self):
- # The Title model has distinct accessors for both
- # model_inheritance.Copy and model_inheritance_same_model_name.Copy
- # models.
- self.title = Title.objects.create(title='Lorem Ipsum')
-
- def test_inheritance_related_name(self):
- from model_inheritance.models import Copy
- self.assertEqual(
- self.title.attached_model_inheritance_copy_set.create(
- content='Save $ on V1agr@',
- url='http://v1agra.com/',
- title='V1agra is spam',
- ), Copy.objects.get(content='Save $ on V1agr@'))
-
- def test_inheritance_with_same_model_name(self):
- from model_inheritance_same_model_name.models import Copy
- self.assertEqual(
- self.title.attached_model_inheritance_same_model_name_copy_set.create(
- content='The Web framework for perfectionists with deadlines.',
- url='http://www.djangoproject.com/',
- title='Django Rocks'
- ), Copy.objects.get(content='The Web framework for perfectionists with deadlines.'))
-
- def test_related_name_attribute_exists(self):
- # The Post model doesn't have an attribute called 'attached_%(app_label)s_%(class)s_set'.
- self.assertEqual(hasattr(self.title, 'attached_%(app_label)s_%(class)s_set'), False)