chore: add pytest configuration for Django tests

This commit is contained in:
TianyangZhang 2026-03-24 17:06:18 +08:00
parent b19c29e24f
commit 4cee7e9569
3 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,7 @@
import pytest
from django.test import Client
@pytest.fixture
def client():
return Client()

5
offer_backend/pytest.ini Normal file
View File

@ -0,0 +1,5 @@
[pytest]
DJANGO_SETTINGS_MODULE = config.settings.development
python_files = tests/test_*.py
python_classes = Test*
python_functions = test_*

View File

@ -8,3 +8,5 @@ redis==5.0.1
django-redis==5.4.0
Pillow==10.3.0
python-decouple==3.8
pytest==8.1.1
pytest-django==4.8.0