hotpocket/services/backend/testing/hotpocket_backend_testing/fixtures/accounts.py
Tomek Wójcik b4338e2769
Some checks failed
CI / Checks (push) Failing after 13m2s
Release v1.0.0
2025-08-20 21:00:50 +02:00

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()