'A contextmanager that returns a MongoContentStore, and deletes its contents
when the context closes.'

@contextmanager
def build(self):

    contentstore = MongoContentStore(db='contentstore{}'.format(random.randint(0, 10000)), collection='content', **COMMON_DOCSTORE_CONFIG)
    contentstore.ensure_indexes()
    try:
        (yield contentstore)
    finally:
        contentstore._drop_database()
