Login using the test utils method.

This commit is contained in:
george 2022-02-03 19:20:39 +00:00
parent 17353c306c
commit c0712a6b95
No known key found for this signature in database
GPG Key ID: D30164B91DE6EEE3
1 changed files with 2 additions and 3 deletions

View File

@ -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