mirror of
https://github.com/django/django.git
synced 2025-07-05 02:09:13 +00:00
[1.2.X] Tweaked some asserts not present in older unittest or deprecated from tests added in r15499. Refs #13987
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15525 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
af03867f00
commit
7cfb2b6335
@ -394,15 +394,15 @@ class ModelInheritanceTest(TestCase):
|
|||||||
# Regression test for #13987: Primary key is incorrectly determined
|
# Regression test for #13987: Primary key is incorrectly determined
|
||||||
# when more than one model has a concrete->abstract->concrete
|
# when more than one model has a concrete->abstract->concrete
|
||||||
# inheritance hierarchy.
|
# inheritance hierarchy.
|
||||||
self.assertEquals(
|
self.assertEqual(
|
||||||
len([field for field in BusStation._meta.local_fields
|
len([field for field in BusStation._meta.local_fields
|
||||||
if field.primary_key]),
|
if field.primary_key]),
|
||||||
1
|
1
|
||||||
)
|
)
|
||||||
self.assertEquals(
|
self.assertEqual(
|
||||||
len([field for field in TrainStation._meta.local_fields
|
len([field for field in TrainStation._meta.local_fields
|
||||||
if field.primary_key]),
|
if field.primary_key]),
|
||||||
1
|
1
|
||||||
)
|
)
|
||||||
self.assertIs(BusStation._meta.pk.model, BusStation)
|
self.assertTrue(BusStation._meta.pk.model is BusStation)
|
||||||
self.assertIs(TrainStation._meta.pk.model, TrainStation)
|
self.assertTrue(TrainStation._meta.pk.model is TrainStation)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user