[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
|
||||
# when more than one model has a concrete->abstract->concrete
|
||||
# inheritance hierarchy.
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
len([field for field in BusStation._meta.local_fields
|
||||
if field.primary_key]),
|
||||
1
|
||||
)
|
||||
self.assertEquals(
|
||||
self.assertEqual(
|
||||
len([field for field in TrainStation._meta.local_fields
|
||||
if field.primary_key]),
|
||||
1
|
||||
)
|
||||
self.assertIs(BusStation._meta.pk.model, BusStation)
|
||||
self.assertIs(TrainStation._meta.pk.model, TrainStation)
|
||||
self.assertTrue(BusStation._meta.pk.model is BusStation)
|
||||
self.assertTrue(TrainStation._meta.pk.model is TrainStation)
|
||||
|
|
Loading…
Reference in New Issue