mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
[1.2.X] Fixed #13206 -- call super().__init__() in Model.__init__ to allow mixins to do things there. Backport of [15317].
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -6,7 +6,7 @@ from django.db import connection
|
||||
from django.test import TestCase
|
||||
|
||||
from models import (Chef, CommonInfo, ItalianRestaurant, ParkingLot, Place,
|
||||
Post, Restaurant, Student, StudentWorker, Supplier, Worker)
|
||||
Post, Restaurant, Student, StudentWorker, Supplier, Worker, MixinModel)
|
||||
|
||||
|
||||
class ModelInheritanceTests(TestCase):
|
||||
@@ -278,4 +278,6 @@ class ModelInheritanceTests(TestCase):
|
||||
finally:
|
||||
settings.DEBUG = old_DEBUG
|
||||
|
||||
|
||||
def test_mixin_init(self):
|
||||
m = MixinModel()
|
||||
self.assertEqual(m.other_attr, 1)
|
||||
|
||||
Reference in New Issue
Block a user