Ticket #10967: 10967-test.diff
File 10967-test.diff, 1.0 KB (added by , 15 years ago) |
---|
-
tests/regressiontests/model_inheritance_regress/models.py
110 110 return "PK = %d, base_name = %s, derived_name = %s" \ 111 111 % (self.customPK, self.base_name, self.derived_name) 112 112 113 class DerivedM2(BaseM): 114 pass 115 113 116 # Check that abstract classes don't get m2m tables autocreated. 114 117 class Person(models.Model): 115 118 name = models.CharField(max_length=100) … … 385 388 >>> p4.bachelorparty_set.all() 386 389 [<BachelorParty: Bachelor party for Bob>, <BachelorParty: Bachelor party for Dave>] 387 390 391 # with multi-table inheritance, forcing an update using a child model with no 392 # fields of its own should work (regression test for #10967) 393 >>> dm2 = DerivedM2.objects.create(base_name='Basic') 394 >>> dm2.base_name = 'Advanced' 395 >>> dm2.save(force_update=True) 396 397 388 398 """} 389 399