def setUpClass(cls): class TestRef(Document): attr = StringField() class TestCls(Document): someattr = StringField() ref = ReferenceField(TestRef) cls.test_ref = TestRef cls.test_cls = TestCls db = 'SanicMongo-test-unit-{}{}'.format(sys.version_info.major, sys.version_info.minor) connect(db)
def setUpClass(cls): db = 'SanicMongo-test-unit-{}{}'.format(sys.version_info.major, sys.version_info.minor) connect(db)
def setUpClass(cls): super().setUpClass() connect(db, async_framework='asyncio')
async def notify_mongo_started(app, loop): # db init # await lg(1, 'connected to mongo') connect(**mongo_cnf)
async def notify_mongo_started(app, loop): connect(host="mongodb://localhost:27017/beepaste")