mirror of
https://github.com/simple-login/app.git
synced 2024-11-14 08:01:13 +01:00
13 lines
298 B
Python
13 lines
298 B
Python
from typing import Tuple
|
|
|
|
from app.models import User, ApiKey
|
|
from tests.utils import create_new_user
|
|
|
|
|
|
def get_new_user_and_api_key() -> Tuple[User, ApiKey]:
|
|
user = create_new_user()
|
|
|
|
# create api_key
|
|
api_key = ApiKey.create(user.id, "for test", commit=True)
|
|
|
|
return user, api_key
|