tests.conftest: use app_context on create_user call

This commit is contained in:
Luna 2019-10-25 08:57:45 -03:00
parent a3f793a211
commit 4d87256cc3
1 changed files with 6 additions and 7 deletions

View File

@ -76,9 +76,8 @@ async def _user_fixture_setup(app):
password = secrets.token_hex(6) password = secrets.token_hex(6)
user_email = email() user_email = email()
user_id, pwd_hash = await create_user( async with app.app_context():
username, user_email, password, app.db, app.loop user_id, pwd_hash = await create_user(username, user_email, password)
)
# generate a token for api access # generate a token for api access
user_token = make_token(user_id, pwd_hash) user_token = make_token(user_id, pwd_hash)