Further simplifications.
This commit is contained in:
@ -1,13 +1,12 @@
|
||||
import pytest
|
||||
|
||||
from wagtail_personalisation import wagtail_hooks as hooks
|
||||
from wagtail_personalisation.models import Segment
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_check_for_variations(segmented_page):
|
||||
def test_variants(segmented_page):
|
||||
segments = Segment.objects.all()
|
||||
page = segmented_page.canonical_page
|
||||
|
||||
variations = hooks._check_for_variations(segments, page)
|
||||
variations = page.variants_for_segments(segments)
|
||||
assert variations
|
||||
|
Reference in New Issue
Block a user