diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-12 12:08:54 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-12 12:08:54 +0100 |
commit | 7db4392801aca82d1dec6eb57abf7cb74c10689c (patch) | |
tree | 3c6a5a565c0c5f7b76568e9c574b83fd0730e719 /ctrack/register/tests/test_forms.py | |
parent | 392ed6017ab01250c1748bd0f2717d8db554115d (diff) |
more tests using parameterization
Diffstat (limited to 'ctrack/register/tests/test_forms.py')
-rw-r--r-- | ctrack/register/tests/test_forms.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ctrack/register/tests/test_forms.py b/ctrack/register/tests/test_forms.py index 7bb12a5..9dd7437 100644 --- a/ctrack/register/tests/test_forms.py +++ b/ctrack/register/tests/test_forms.py @@ -66,6 +66,8 @@ def test_meeting_blank_data(user): "CAF_RECEIVED", "CAF_FEEDBACK_EMAILED_OES", "CAF_EMAILED_ROSA", + "CAF_VALIDATION_SIGN_OFF", + "CAF_VALIDATION_RECORD_EMAILED_TO_OES", ], ) def test_allowable_caf_single_date_event_forms(allowed_type, user, caf): @@ -82,10 +84,14 @@ def test_allowable_caf_single_date_event_forms(allowed_type, user, caf): assert form.is_valid() -def test_cannot_create_two_caf_initial_receipt_events_on_same_day(user, caf): +@pytest.mark.parametrize( + "allowed_type", + ["CAF_INITIAL_CAF_RECEIVED", "CAF_VALIDATION_SIGN_OFF", "CAF_RECEIVED"], +) +def test_cannot_do_some_caf_single_date_events_on_same_day(allowed_type, user, caf): form1 = CAFSingleDateEventForm( { - "type_descriptor": "CAF_INITIAL_CAF_RECEIVED", + "type_descriptor": allowed_type, "related_caf": caf, "short_description": "Test Short Description", "date": "2010-07-01", @@ -95,7 +101,7 @@ def test_cannot_create_two_caf_initial_receipt_events_on_same_day(user, caf): ) form2 = CAFSingleDateEventForm( { - "type_descriptor": "CAF_INITIAL_CAF_RECEIVED", + "type_descriptor": allowed_type, "related_caf": caf, "short_description": "Test Short Description", "date": "2010-07-01", |