agenda_culturel/src/tests/conftest.py

18 lines
372 B
Python
Raw Normal View History

2023-05-10 09:02:59 +02:00
import pytest
from django.contrib.auth.models import User
@pytest.fixture(autouse=True)
def enable_db_access_for_all_tests(db):
"""
This fixture enables database access for all tests.
"""
pass
@pytest.fixture
def test_user():
return User.objects.create_user(
2023-05-10 13:19:19 +02:00
username="test_user", email="test_user@test.com", password="test_password"
2023-05-10 09:02:59 +02:00
)