'Ensure that a document superclass can be marked as abstract
thereby not using it as the name for the collection.'

def test_abstract_documents(self):

    defaults = {'index_background': True, 'index_drop_dups': True, 'index_opts': {'hello': 'world'}, 'allow_inheritance': True, 'queryset_class': 'QuerySet', 'db_alias': 'myDB', 'shard_key': ('hello', 'world')}
    meta_settings = {'abstract': True}
    meta_settings.update(defaults)
    class Animal(Document, ):
        name = StringField()
        meta = meta_settings
    class Fish(Animal, ):
        pass
    class Guppy(Fish, ):
        pass
    class Mammal(Animal, ):
        meta = {'abstract': True}
    class Human(Mammal, ):
        pass
    for (k, v) in defaults.iteritems():
        for cls in [Animal, Fish, Guppy]:
            self.assertEqual(cls._meta[k], v)
    self.assertFalse(('collection' in Animal._meta))
    self.assertFalse(('collection' in Mammal._meta))
    self.assertEqual(Animal._get_collection_name(), None)
    self.assertEqual(Mammal._get_collection_name(), None)
    self.assertEqual(Fish._get_collection_name(), 'fish')
    self.assertEqual(Guppy._get_collection_name(), 'fish')
    self.assertEqual(Human._get_collection_name(), 'human')
    with self.assertRaises(ValueError):
        class EvilHuman(Human, ):
            evil = BooleanField(default=True)
            meta = {'abstract': True}
