'ensure that all of the indexes are listed regardless of the super-
or sub-class that we call it from'

def test_list_indexes_inheritance(self):

    class BlogPost(Document, ):
        author = StringField()
        title = StringField()
        description = StringField()
        meta = {'allow_inheritance': True}
    class BlogPostWithTags(BlogPost, ):
        tags = StringField()
        meta = {'indexes': [('author', 'tags')]}
    class BlogPostWithTagsAndExtraText(BlogPostWithTags, ):
        extra_text = StringField()
        meta = {'indexes': [('author', 'tags', 'extra_text')]}
    BlogPost.drop_collection()
    BlogPost.ensure_indexes()
    BlogPostWithTags.ensure_indexes()
    BlogPostWithTagsAndExtraText.ensure_indexes()
    self.assertEqual(BlogPost.list_indexes(), BlogPostWithTags.list_indexes())
    self.assertEqual(BlogPost.list_indexes(), BlogPostWithTagsAndExtraText.list_indexes())
    self.assertEqual(BlogPost.list_indexes(), [[('_cls', 1), ('author', 1), ('tags', 1)], [('_cls', 1), ('author', 1), ('tags', 1), ('extra_text', 1)], [(u'_id', 1)], [('_cls', 1)]])
