7
This repository has been archived on 2023-05-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
cavemanon-wagtail-personali…/tests/conftest.py
2019-03-15 11:21:14 +01:00

21 lines
467 B
Python

import pytest
pytest_plugins = [
'tests.fixtures'
]
@pytest.fixture(autouse=True)
def enable_db_access(db):
pass
@pytest.fixture(scope='session')
def django_db_setup(django_db_setup, django_db_blocker):
from wagtail.core.models import Page, Site
with django_db_blocker.unblock():
# Remove some initial data that is brought by the tests.site module
Site.objects.all().delete()
Page.objects.all().exclude(depth=1).delete()