<reponame>Yanyinghenmei/awesome-python3-webapp<gh_stars>0
import orm
import asyncio
from models import User, Blog, Comment

async def test(loop):
    await orm.create_pool(loop = loop, host='localhost', user='www-data', password='<PASSWORD>', db='awesome')

    u = User(name='Test', email='<EMAIL>', passwd='<PASSWORD>', image='about:blank')

    await u.save()


loop = asyncio.get_event_loop()
loop.run_until_complete(test(loop))
loop.run_forever()

for x in test(loop):
    pass

import orm
import asyncio
from models import User, Blog, Comment

async def test(loop):
    await orm.create_pool(loop = loop, host='localhost', user='www-data', password='<PASSWORD>', db='awesome')

    u = User(name='Test', email='<EMAIL>', passwd='<PASSWORD>', image='about:blank')

    await u.save()


loop = asyncio.get_event_loop()
loop.run_until_complete(test(loop))
loop.run_forever()

for x in test(loop):
    pass