We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 847ac41 commit f951543Copy full SHA for f951543
tests/unit/model/test_rules.py
@@ -5,7 +5,20 @@
5
from tests.fixtures.builders.model.rule import IterationFactory, RawCampaignConfigFactory
6
7
8
-def test_start_date_must_be_before_end_date(faker: Faker):
+def test_campaign_must_have_at_least_one_iteration():
9
+ # Given
10
+
11
+ # When, Then
12
+ with pytest.raises(
13
+ ValueError,
14
+ match=r"1 validation error for CampaignConfig\n"
15
+ r"iterations\n"
16
+ r".*List should have at least 1 item",
17
+ ):
18
+ RawCampaignConfigFactory.build(iterations=[])
19
20
21
+def test_campaign_start_date_must_be_before_end_date(faker: Faker):
22
# Given
23
start_date = faker.date_object()
24
end_date = start_date - relativedelta(days=1)
0 commit comments