charasheet/src/conftest.py

25 lines
546 B
Python
Raw Normal View History

2022-10-28 22:16:23 +02:00
import pytest
from django.core.management import call_command
@pytest.fixture(scope="session", autouse=True)
def collectstatic():
call_command("collectstatic", "--clear", "--noinput", "--verbosity=0")
2022-11-10 19:23:47 +01:00
@pytest.fixture
def firefox_options(firefox_options):
firefox_options.add_argument("-headless")
return firefox_options
2022-11-11 08:59:18 +01:00
@pytest.fixture(autouse=True)
def settings(settings):
settings.DEBUG_TOOLBAR = False
return settings
2022-11-19 09:45:30 +01:00
@pytest.fixture
def initial_data(db: None) -> None:
call_command("loaddata", "initial_data")