8

Refactor the test structure

This renames the tests.sandbox app to tests.site to clear up some
confusion with the two sandbox app's.
This commit is contained in:
Michael van Tellingen
2017-06-02 09:25:18 +02:00
parent dfb364b7fc
commit d92fe13d37
18 changed files with 33 additions and 120 deletions

View File

@@ -1,7 +1,6 @@
from __future__ import absolute_import, unicode_literals
import pytest
from wagtail.wagtailcore.models import Page, Site
pytest_plugins = [
'tests.fixtures'
@@ -10,7 +9,9 @@ pytest_plugins = [
@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 sandbox module
# Remove some initial data that is brought by the tests.site module
Site.objects.all().delete()
Page.objects.all().exclude(depth=1).delete()