Skip to content

Commit

Permalink
✅ Add another test for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos committed Oct 24, 2023
1 parent 859daee commit 5c0739f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/openforms/forms/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,18 @@ def test_str_no_relation(self):
self.assertEqual(str(step), "FormStep object (None)")

def test_clean(self):
step = FormStepFactory.create(
step_raises = FormStepFactory.create(
order=0,
is_applicable=False,
)
self.assertRaises(ValidationError, step.clean)
step_ok = FormStepFactory.create(
order=0,
is_applicable=True,
)
with self.subTest("clean raises"):
self.assertRaises(ValidationError, step_raises.clean)
with self.subTest("clean does not raises"):
step_ok.clean()


class FormLogicTests(TestCase):
Expand Down

0 comments on commit 5c0739f

Please sign in to comment.