Ticket #14423: test_14423_trunk.diff

File test_14423_trunk.diff, 943 bytes (added by PhiR_42, 14 years ago)

regression test

  • tests/regressiontests/model_inheritance_regress/models.py

     
    276276>>> obj = SelfRefChild.objects.create(child_data=37, parent_data=42)
    277277>>> obj.delete()
    278278
     279# Regression test for #14423
     280# exclude from child class must take into account the null property of the parent's field
     281
     282>>> obj = SelfRefChild.objects.create(child_data=37, parent_data=42)
     283>>> len(SelfRefParent.objects.exclude(self_data = 42))
     2841
     285>>> len(SelfRefChild.objects.exclude(self_data = 42))
     2861
     287>>> obj.delete()
     288
    279289# Regression tests for #8076 - get_(next/previous)_by_date should work.
    280290>>> c1 = ArticleWithAuthor(headline='ArticleWithAuthor 1', author="Person 1", pub_date=datetime.datetime(2005, 8, 1, 3, 0))
    281291>>> c1.save()
Back to Top