Fixed MRO issue in base.py MongoEngine/mongoengine#95

This commit is contained in:
Ross Lawley
2012-08-24 08:54:54 +01:00
parent 03beb6852a
commit f594ece32a
2 changed files with 12 additions and 13 deletions

View File

@@ -373,18 +373,18 @@ class DocumentTest(unittest.TestCase):
'allow_inheritance': True,
'abstract': True,
}
class DateUpdatedDocument(Document):
meta = {
'allow_inheritance': True,
'abstract': True,
}
def create_my_document():
try:
class MyDocument(DateCreatedDocument, DateUpdatedDocument):
pass
create_my_document()
except:
self.assertTrue(False, "Couldn't create MyDocument class")
def test_how_to_turn_off_inheritance(self):
"""Demonstrates migrating from allow_inheritance = True to False.