# Third-Party
import pytest
from rest_framework.test import APIClient

# Django
from django.test.client import Client

# First-Party
from api.factories import (
    AppearanceFactory,
    AssignmentFactory,
    AwardFactory,
    ChartFactory,
    ContestantFactory,
    ContestFactory,
    ConventionFactory,
    EntryFactory,
    GrantorFactory,
    GroupFactory,
    MemberFactory,
    OfficeFactory,
    OfficerFactory,
    OrganizationFactory,
    PanelistFactory,
    ParticipantFactory,
    PersonFactory,
    RepertoryFactory,
    RoundFactory,
    ScoreFactory,
    SessionFactory,
    SlotFactory,
    SongFactory,
    UserFactory,
    VenueFactory,
)


@pytest.fixture
def admin_client():
    admin = UserFactory(
        is_staff=True,
    )
    client = Client()
    client.force_login(admin)
    return client


@pytest.fixture
def api_client():
    admin = UserFactory(
        is_staff=True,
    )
    client = APIClient()
    client.force_authenticate(user=admin)
    return client


@pytest.fixture
def user_client():
    user = UserFactory()
    client = Client()
    client.force_login(user)
    return client


@pytest.fixture
def api_user_client():
    user = UserFactory()
    client = APIClient()
    client.force_authenticate(user=user)
    return client


@pytest.fixture
def bhs_member():
    user = UserFactory()
    client = APIClient()
    client.force_authenticate(user=user)
    return client


@pytest.fixture
def appearance():
    return AppearanceFactory()


@pytest.fixture
def assignment():
    return AssignmentFactory()


@pytest.fixture
def award():
    return AwardFactory()


@pytest.fixture
def chart():
    return ChartFactory()


@pytest.fixture
def contest():
    return ContestFactory()


@pytest.fixture
def contestant():
    return ContestantFactory()


@pytest.fixture
def convention():
    return ConventionFactory()


@pytest.fixture
def entry():
    return EntryFactory()


@pytest.fixture
def grantor():
    return GrantorFactory()


@pytest.fixture
def group():
    return GroupFactory()


@pytest.fixture
def member():
    return MemberFactory()


@pytest.fixture
def office():
    return OfficeFactory()


@pytest.fixture
def officer():
    return OfficerFactory()


@pytest.fixture
def organization():
    return OrganizationFactory()


@pytest.fixture
def panelist():
    return PanelistFactory()


@pytest.fixture
def participant():
    return ParticipantFactory()


@pytest.fixture
def person():
    return PersonFactory()


@pytest.fixture
def repertory():
    return RepertoryFactory()


@pytest.fixture
def round():
    return RoundFactory()


@pytest.fixture
def score():
    return ScoreFactory()


@pytest.fixture
def session():
    return SessionFactory()


@pytest.fixture
def slot():
    return SlotFactory()


@pytest.fixture
def song():
    return SongFactory()


@pytest.fixture
def venue():
    return VenueFactory()


@pytest.fixture
def user():
    return UserFactory()

1bf25add3330507458a79c0ae5de364c4b0a3888
<mask token>


@pytest.fixture
def api_client():
    admin = UserFactory(is_staff=True)
    client = APIClient()
    client.force_authenticate(user=admin)
    return client


@pytest.fixture
def user_client():
    user = UserFactory()
    client = Client()
    client.force_login(user)
    return client


@pytest.fixture
def api_user_client():
    user = UserFactory()
    client = APIClient()
    client.force_authenticate(user=user)
    return client


<mask token>


@pytest.fixture
def assignment():
    return AssignmentFactory()


<mask token>


@pytest.fixture
def chart():
    return ChartFactory()


<mask token>


@pytest.fixture
def entry():
    return EntryFactory()


@pytest.fixture
def grantor():
    return GrantorFactory()


@pytest.fixture
def group():
    return GroupFactory()


<mask token>


@pytest.fixture
def office():
    return OfficeFactory()


@pytest.fixture
def officer():
    return OfficerFactory()


<mask token>


@pytest.fixture
def participant():
    return ParticipantFactory()


@pytest.fixture
def person():
    return PersonFactory()


@pytest.fixture
def repertory():
    return RepertoryFactory()


<mask token>


@pytest.fixture
def score():
    return ScoreFactory()


@pytest.fixture
def session():
    return SessionFactory()


<mask token>


@pytest.fixture
def song():
    return SongFactory()


<mask token>


@pytest.fixture
def user():
    return UserFactory()

<mask token>


@pytest.fixture
def admin_client():
    admin = UserFactory(is_staff=True)
    client = Client()
    client.force_login(admin)
    return client


@pytest.fixture
def api_client():
    admin = UserFactory(is_staff=True)
    client = APIClient()
    client.force_authenticate(user=admin)
    return client


@pytest.fixture
def user_client():
    user = UserFactory()
    client = Client()
    client.force_login(user)
    return client


@pytest.fixture
def api_user_client():
    user = UserFactory()
    client = APIClient()
    client.force_authenticate(user=user)
    return client


<mask token>


@pytest.fixture
def assignment():
    return AssignmentFactory()


<mask token>


@pytest.fixture
def chart():
    return ChartFactory()


<mask token>


@pytest.fixture
def convention():
    return ConventionFactory()


@pytest.fixture
def entry():
    return EntryFactory()


@pytest.fixture
def grantor():
    return GrantorFactory()


@pytest.fixture
def group():
    return GroupFactory()


<mask token>


@pytest.fixture
def office():
    return OfficeFactory()


@pytest.fixture
def officer():
    return OfficerFactory()


<mask token>


@pytest.fixture
def participant():
    return ParticipantFactory()


@pytest.fixture
def person():
    return PersonFactory()


@pytest.fixture
def repertory():
    return RepertoryFactory()


<mask token>


@pytest.fixture
def score():
    return ScoreFactory()


@pytest.fixture
def session():
    return SessionFactory()


@pytest.fixture
def slot():
    return SlotFactory()


@pytest.fixture
def song():
    return SongFactory()


<mask token>


@pytest.fixture
def user():
    return UserFactory()

<mask token>


@pytest.fixture
def admin_client():
    admin = UserFactory(is_staff=True)
    client = Client()
    client.force_login(admin)
    return client


@pytest.fixture
def api_client():
    admin = UserFactory(is_staff=True)
    client = APIClient()
    client.force_authenticate(user=admin)
    return client


@pytest.fixture
def user_client():
    user = UserFactory()
    client = Client()
    client.force_login(user)
    return client


@pytest.fixture
def api_user_client():
    user = UserFactory()
    client = APIClient()
    client.force_authenticate(user=user)
    return client


@pytest.fixture
def bhs_member():
    user = UserFactory()
    client = APIClient()
    client.force_authenticate(user=user)
    return client


@pytest.fixture
def appearance():
    return AppearanceFactory()


@pytest.fixture
def assignment():
    return AssignmentFactory()


<mask token>


@pytest.fixture
def chart():
    return ChartFactory()


<mask token>


@pytest.fixture
def convention():
    return ConventionFactory()


@pytest.fixture
def entry():
    return EntryFactory()


@pytest.fixture
def grantor():
    return GrantorFactory()


@pytest.fixture
def group():
    return GroupFactory()


<mask token>


@pytest.fixture
def office():
    return OfficeFactory()


@pytest.fixture
def officer():
    return OfficerFactory()


@pytest.fixture
def organization():
    return OrganizationFactory()


<mask token>


@pytest.fixture
def participant():
    return ParticipantFactory()


@pytest.fixture
def person():
    return PersonFactory()


@pytest.fixture
def repertory():
    return RepertoryFactory()


<mask token>


@pytest.fixture
def score():
    return ScoreFactory()


@pytest.fixture
def session():
    return SessionFactory()


@pytest.fixture
def slot():
    return SlotFactory()


@pytest.fixture
def song():
    return SongFactory()


<mask token>


@pytest.fixture
def user():
    return UserFactory()

<mask token>


@pytest.fixture
def admin_client():
    admin = UserFactory(is_staff=True)
    client = Client()
    client.force_login(admin)
    return client


@pytest.fixture
def api_client():
    admin = UserFactory(is_staff=True)
    client = APIClient()
    client.force_authenticate(user=admin)
    return client


@pytest.fixture
def user_client():
    user = UserFactory()
    client = Client()
    client.force_login(user)
    return client


@pytest.fixture
def api_user_client():
    user = UserFactory()
    client = APIClient()
    client.force_authenticate(user=user)
    return client


@pytest.fixture
def bhs_member():
    user = UserFactory()
    client = APIClient()
    client.force_authenticate(user=user)
    return client


@pytest.fixture
def appearance():
    return AppearanceFactory()


@pytest.fixture
def assignment():
    return AssignmentFactory()


@pytest.fixture
def award():
    return AwardFactory()


@pytest.fixture
def chart():
    return ChartFactory()


@pytest.fixture
def contest():
    return ContestFactory()


@pytest.fixture
def contestant():
    return ContestantFactory()


@pytest.fixture
def convention():
    return ConventionFactory()


@pytest.fixture
def entry():
    return EntryFactory()


@pytest.fixture
def grantor():
    return GrantorFactory()


@pytest.fixture
def group():
    return GroupFactory()


@pytest.fixture
def member():
    return MemberFactory()


@pytest.fixture
def office():
    return OfficeFactory()


@pytest.fixture
def officer():
    return OfficerFactory()


@pytest.fixture
def organization():
    return OrganizationFactory()


@pytest.fixture
def panelist():
    return PanelistFactory()


@pytest.fixture
def participant():
    return ParticipantFactory()


@pytest.fixture
def person():
    return PersonFactory()


@pytest.fixture
def repertory():
    return RepertoryFactory()


@pytest.fixture
def round():
    return RoundFactory()


@pytest.fixture
def score():
    return ScoreFactory()


@pytest.fixture
def session():
    return SessionFactory()


@pytest.fixture
def slot():
    return SlotFactory()


@pytest.fixture
def song():
    return SongFactory()


@pytest.fixture
def venue():
    return VenueFactory()


@pytest.fixture
def user():
    return UserFactory()

# Third-Party
import pytest
from rest_framework.test import APIClient

# Django
from django.test.client import Client

# First-Party
from api.factories import (
    AppearanceFactory,
    AssignmentFactory,
    AwardFactory,
    ChartFactory,
    ContestantFactory,
    ContestFactory,
    ConventionFactory,
    EntryFactory,
    GrantorFactory,
    GroupFactory,
    MemberFactory,
    OfficeFactory,
    OfficerFactory,
    OrganizationFactory,
    PanelistFactory,
    ParticipantFactory,
    PersonFactory,
    RepertoryFactory,
    RoundFactory,
    ScoreFactory,
    SessionFactory,
    SlotFactory,
    SongFactory,
    UserFactory,
    VenueFactory,
)


@pytest.fixture
def admin_client():
    admin = UserFactory(
        is_staff=True,
    )
    client = Client()
    client.force_login(admin)
    return client


@pytest.fixture
def api_client():
    admin = UserFactory(
        is_staff=True,
    )
    client = APIClient()
    client.force_authenticate(user=admin)
    return client


@pytest.fixture
def user_client():
    user = UserFactory()
    client = Client()
    client.force_login(user)
    return client


@pytest.fixture
def api_user_client():
    user = UserFactory()
    client = APIClient()
    client.force_authenticate(user=user)
    return client


@pytest.fixture
def bhs_member():
    user = UserFactory()
    client = APIClient()
    client.force_authenticate(user=user)
    return client


@pytest.fixture
def appearance():
    return AppearanceFactory()


@pytest.fixture
def assignment():
    return AssignmentFactory()


@pytest.fixture
def award():
    return AwardFactory()


@pytest.fixture
def chart():
    return ChartFactory()


@pytest.fixture
def contest():
    return ContestFactory()


@pytest.fixture
def contestant():
    return ContestantFactory()


@pytest.fixture
def convention():
    return ConventionFactory()


@pytest.fixture
def entry():
    return EntryFactory()


@pytest.fixture
def grantor():
    return GrantorFactory()


@pytest.fixture
def group():
    return GroupFactory()


@pytest.fixture
def member():
    return MemberFactory()


@pytest.fixture
def office():
    return OfficeFactory()


@pytest.fixture
def officer():
    return OfficerFactory()


@pytest.fixture
def organization():
    return OrganizationFactory()


@pytest.fixture
def panelist():
    return PanelistFactory()


@pytest.fixture
def participant():
    return ParticipantFactory()


@pytest.fixture
def person():
    return PersonFactory()


@pytest.fixture
def repertory():
    return RepertoryFactory()


@pytest.fixture
def round():
    return RoundFactory()


@pytest.fixture
def score():
    return ScoreFactory()


@pytest.fixture
def session():
    return SessionFactory()


@pytest.fixture
def slot():
    return SlotFactory()


@pytest.fixture
def song():
    return SongFactory()


@pytest.fixture
def venue():
    return VenueFactory()


@pytest.fixture
def user():
    return UserFactory()
