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
2016-11-30 17:21:43 +01:00

14 lines
434 B
Python

import pytest
from django.apps import apps
from wagtail.wagtailcore.models import Page, Site
from tests.sandbox.pages.models import HomePage
@pytest.fixture(scope='session')
def django_db_setup(django_db_setup, django_db_blocker):
with django_db_blocker.unblock():
# Remove some initial data that is brought by the sandbox module
Site.objects.all().delete()
Page.objects.all().exclude(depth=1).delete()