mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-05-16 22:01:08 +00:00
Update model tests to include our new InheritanceManagerTestChild3
as part of the emulation of select_subclasses. Test still fails because of #59.
This commit is contained in:
parent
ae71f9080e
commit
262455a60d
1 changed files with 7 additions and 2 deletions
|
|
@ -781,6 +781,7 @@ class InheritanceManagerUsingModelsTests(TestCase):
|
|||
objs = InheritanceManagerTestParent.objects.select_subclasses().order_by('pk')
|
||||
objsmodels = InheritanceManagerTestParent.objects.select_subclasses(
|
||||
InheritanceManagerTestChild1, InheritanceManagerTestChild2,
|
||||
InheritanceManagerTestChild3,
|
||||
InheritanceManagerTestGrandChild1,
|
||||
InheritanceManagerTestGrandChild1_2).order_by('pk')
|
||||
self.assertEqual(set(objs.subclasses), set(objsmodels.subclasses))
|
||||
|
|
@ -801,11 +802,15 @@ class InheritanceManagerUsingModelsTests(TestCase):
|
|||
objs = InheritanceManagerTestParent.objects.select_subclasses().order_by('pk')
|
||||
|
||||
if django.VERSION >= (1, 6, 0):
|
||||
models = (InheritanceManagerTestChild1, InheritanceManagerTestChild2,
|
||||
models = (InheritanceManagerTestChild1,
|
||||
InheritanceManagerTestChild2,
|
||||
InheritanceManagerTestChild3,
|
||||
InheritanceManagerTestGrandChild1,
|
||||
InheritanceManagerTestGrandChild1_2)
|
||||
else:
|
||||
models = (InheritanceManagerTestChild1, InheritanceManagerTestChild2)
|
||||
models = (InheritanceManagerTestChild1,
|
||||
InheritanceManagerTestChild2,
|
||||
InheritanceManagerTestChild3)
|
||||
|
||||
objsmodels = InheritanceManagerTestParent.objects.select_subclasses(
|
||||
*models).order_by('pk')
|
||||
|
|
|
|||
Loading…
Reference in a new issue