mirror of https://gitlab.com/litecord/litecord.git
tests.conftest: use app_context on create_user call
This commit is contained in:
parent
a3f793a211
commit
4d87256cc3
|
|
@ -76,9 +76,8 @@ async def _user_fixture_setup(app):
|
|||
password = secrets.token_hex(6)
|
||||
user_email = email()
|
||||
|
||||
user_id, pwd_hash = await create_user(
|
||||
username, user_email, password, app.db, app.loop
|
||||
)
|
||||
async with app.app_context():
|
||||
user_id, pwd_hash = await create_user(username, user_email, password)
|
||||
|
||||
# generate a token for api access
|
||||
user_token = make_token(user_id, pwd_hash)
|
||||
|
|
|
|||
Loading…
Reference in New Issue