Ticket #16739: 16739-test.diff

File 16739-test.diff, 748 bytes (added by Tim Graham, 10 years ago)
  • tests/invalid_models_tests/test_models.py

    diff --git a/tests/invalid_models_tests/test_models.py b/tests/invalid_models_tests/test_models.py
    index 3c874ad..655c764 100644
    a b class FieldNamesTests(IsolatedModelsTestCase):  
    426426
    427427class ShadowingFieldsTests(IsolatedModelsTestCase):
    428428
     429    def test_inheritance_chain_checking(self):
     430        class A(models.Model):
     431            foo = models.IntegerField()
     432
     433        class B(A):
     434            pass
     435
     436        class C(B):
     437            foo = models.IntegerField()
     438
     439        self.assertNotEqual(C.check(), [])
     440
    429441    def test_multiinheritance_clash(self):
    430442        class Mother(models.Model):
    431443            clash = models.IntegerField()
Back to Top