49 lines
1.0 KiB
Python
49 lines
1.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
# type: ignore
|
|
from __future__ import annotations
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture
|
|
def account_password():
|
|
return 'thisisntright'
|
|
|
|
|
|
@pytest.fixture
|
|
def account():
|
|
from hotpocket_backend_testing.factories.accounts import AccountFactory
|
|
return AccountFactory()
|
|
|
|
|
|
@pytest.fixture
|
|
def federated_account():
|
|
from hotpocket_backend.apps.accounts.models import Account
|
|
from hotpocket_backend_testing.factories.accounts import AccountFactory
|
|
|
|
result: Account = AccountFactory()
|
|
result.set_unusable_password()
|
|
result.save()
|
|
|
|
return result
|
|
|
|
|
|
@pytest.fixture
|
|
def account_with_password(account, account_password):
|
|
account.set_password(account_password)
|
|
account.save()
|
|
|
|
return account
|
|
|
|
|
|
@pytest.fixture
|
|
def inactive_account():
|
|
from hotpocket_backend_testing.factories.accounts import AccountFactory
|
|
return AccountFactory(is_active=False)
|
|
|
|
|
|
@pytest.fixture
|
|
def other_account():
|
|
from hotpocket_backend_testing.factories.accounts import AccountFactory
|
|
return AccountFactory()
|