def ensure_maintenance_collection(): if not database: return None try: database.create_collection('maintenance') except CollectionInvalid: pass
def setUpClass(cls): super(TestTransactionContext, cls).setUpClass() try: database.create_collection('transaction') except CollectionInvalid: pass cls.collection = database[TEST_COLLECTION_NAME]
def ensure_maintenance_collection(): try: database.create_collection('maintenance') except CollectionInvalid: pass