mirror of
https://github.com/simple-login/app.git
synced 2024-09-20 23:16:00 +08:00
Login using the test utils method.
This commit is contained in:
parent
17353c306c
commit
c0712a6b95
|
@ -1,11 +1,10 @@
|
|||
from app.db import Session
|
||||
from app.models import User, ApiKey
|
||||
from tests.utils import login
|
||||
|
||||
|
||||
def test_create_delete_api_key(flask_client):
|
||||
user = User.create(
|
||||
email="a@b.c", password="password", name="Test User", activated=True
|
||||
)
|
||||
user = login(flask_client)
|
||||
Session.commit()
|
||||
|
||||
# create api_key
|
||||
|
|
Loading…
Reference in a new issue