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_rules_referral.py
Michael Yick b8d7dd53ae Support Wagtail 4.2 (#1)
Co-authored-by: nick.moreton <nick.moreton@torchbox.com>
Co-authored-by: Nick Moreton <nick.moreton@torchbox.com>
Reviewed-on: #1
2023-05-07 03:25:48 +00:00

13 lines
360 B
Python

import pytest
from tests.factories.rule import ReferralRuleFactory
from tests.factories.segment import SegmentFactory
@pytest.mark.django_db
def test_referral_rule_create():
segment = SegmentFactory(name="Referral")
referral_rule = ReferralRuleFactory(regex_string="test.test", segment=segment)
assert referral_rule.regex_string == "test.test"