'Test that declaring an extra class updates meta data'

def test_dynamic_declarations(self):

    class Animal(Document, ):
        meta = {'allow_inheritance': True}
    self.assertEqual(Animal._superclasses, ())
    self.assertEqual(Animal._subclasses, ('Animal',))
    class Fish(Animal, ):
        pass
    self.assertEqual(Animal._superclasses, ())
    self.assertEqual(Animal._subclasses, ('Animal', 'Animal.Fish'))
    self.assertEqual(Fish._superclasses, ('Animal',))
    self.assertEqual(Fish._subclasses, ('Animal.Fish',))
    class Pike(Fish, ):
        pass
    self.assertEqual(Animal._superclasses, ())
    self.assertEqual(Animal._subclasses, ('Animal', 'Animal.Fish', 'Animal.Fish.Pike'))
    self.assertEqual(Fish._superclasses, ('Animal',))
    self.assertEqual(Fish._subclasses, ('Animal.Fish', 'Animal.Fish.Pike'))
    self.assertEqual(Pike._superclasses, ('Animal', 'Animal.Fish'))
    self.assertEqual(Pike._subclasses, ('Animal.Fish.Pike',))
