split club/tests.py

This commit is contained in:
Thomas Girod
2025-04-04 14:25:26 +02:00
parent 3d40e92958
commit 056b3a1702
6 changed files with 455 additions and 449 deletions

16
club/tests/test_sales.py Normal file
View File

@ -0,0 +1,16 @@
import pytest
from django.test import Client
from django.urls import reverse
from model_bakery import baker
from club.models import Club
from core.models import User
@pytest.mark.django_db
def test_sales_page_doesnt_crash(client: Client):
club = baker.make(Club)
admin = baker.make(User, is_superuser=True)
client.force_login(admin)
response = client.get(reverse("club:club_sellings", kwargs={"club_id": club.id}))
assert response.status_code == 200