post rebase fixes
This commit is contained in:
committed by
Michael van Tellingen
parent
ebef7f8785
commit
1b73119766
@@ -150,10 +150,7 @@ class PersonalisablePageMixin(models.Model):
|
||||
'is_segmented': True,
|
||||
}
|
||||
|
||||
try:
|
||||
return Page.objects.get(slug=slug, parent=self.parent).specific
|
||||
except Page.DoesNotExist:
|
||||
return self.copy(update_attrs=update_attrs, copy_revisions=False)
|
||||
return self.copy(update_attrs=update_attrs, copy_revisions=False)
|
||||
|
||||
def variants_for_segments(self, segments):
|
||||
return self.__class__.objects.filter(
|
||||
|
@@ -17,9 +17,3 @@ def django_db_setup(django_db_setup, django_db_blocker):
|
||||
Site.objects.all().delete()
|
||||
Page.objects.all().exclude(depth=1).delete()
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def site():
|
||||
site = SiteFactory(is_default_site=True)
|
||||
PageFactory(parent=site.root_page, slug='page-1')
|
||||
PageFactory(parent=site.root_page, slug='page-2')
|
||||
|
@@ -5,9 +5,12 @@ from tests.factories.segment import SegmentFactory
|
||||
from tests.factories.site import SiteFactory
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@pytest.fixture(scope='function')
|
||||
def site():
|
||||
return SiteFactory()
|
||||
site = SiteFactory(is_default_site=True)
|
||||
PageFactory(parent=site.root_page, slug='page-1')
|
||||
PageFactory(parent=site.root_page, slug='page-2')
|
||||
return site
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
@@ -85,8 +85,6 @@ INSTALLED_APPS = (
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
|
||||
'tests.sandbox.pages'
|
||||
)
|
||||
|
||||
PASSWORD_HASHERS = (
|
||||
|
Reference in New Issue
Block a user