From a4b09344af067a6cd44615697a9a356019230422 Mon Sep 17 00:00:00 2001 From: Anthony Nemitz Date: Thu, 23 Aug 2012 18:08:12 -0700 Subject: [PATCH] test case for multiple inheritance raising MRO exception --- tests/test_document.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/test_document.py b/tests/test_document.py index bee6c5c6..8f28e7e5 100644 --- a/tests/test_document.py +++ b/tests/test_document.py @@ -365,6 +365,28 @@ class DocumentTest(unittest.TestCase): Animal.drop_collection() + def test_document_inheritance(self): + """ + + """ + class DateCreatedDocument(Document): + meta = { + 'allow_inheritance': True, + 'abstract': True, + } + + class DateUpdatedDocument(Document): + meta = { + 'allow_inheritance': True, + 'abstract': True, + } + + def create_my_document(): + class MyDocument(DateCreatedDocument, DateUpdatedDocument): + pass + + create_my_document() + def test_how_to_turn_off_inheritance(self): """Demonstrates migrating from allow_inheritance = True to False. """