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/unit/test_hooks.py
2017-05-31 17:38:51 +02:00

13 lines
281 B
Python

import pytest
from wagtail_personalisation.models import Segment
@pytest.mark.django_db
def test_variants(segmented_page):
segments = Segment.objects.all()
page = segmented_page.canonical_page
variations = page.variants_for_segments(segments)
assert variations