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
Michael van Tellingen d92fe13d37 Refactor the test structure
This renames the tests.sandbox app to tests.site to clear up some
confusion with the two sandbox app's.
2017-06-02 09:25:51 +02:00

18 lines
465 B
Python

from __future__ import absolute_import, unicode_literals
import pytest
pytest_plugins = [
'tests.fixtures'
]
@pytest.fixture(scope='session')
def django_db_setup(django_db_setup, django_db_blocker):
from wagtail.wagtailcore.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()