mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
split club/tests.py
This commit is contained in:
16
club/tests/test_sales.py
Normal file
16
club/tests/test_sales.py
Normal 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
|
Reference in New Issue
Block a user