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.db import Session
|
||||||
from app.models import User, ApiKey
|
from app.models import User, ApiKey
|
||||||
|
from tests.utils import login
|
||||||
|
|
||||||
|
|
||||||
def test_create_delete_api_key(flask_client):
|
def test_create_delete_api_key(flask_client):
|
||||||
user = User.create(
|
user = login(flask_client)
|
||||||
email="a@b.c", password="password", name="Test User", activated=True
|
|
||||||
)
|
|
||||||
Session.commit()
|
Session.commit()
|
||||||
|
|
||||||
# create api_key
|
# create api_key
|
||||||
|
|
Loading…
Reference in a new issue