aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-12 16:11:18 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-12 16:11:18 +0100
commit7bec7a48f26fb5671c5c05ea28f1a631c742728d (patch)
treedab46d05026a4d141e3212e60601d26787f39e87 /ctrack
parenta0f2ae2c885f8bcc72fe0bbc549384fcc20b857b (diff)
tidy
Diffstat (limited to 'ctrack')
-rw-r--r--ctrack/register/tests/test_event_models.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/ctrack/register/tests/test_event_models.py b/ctrack/register/tests/test_event_models.py
index 61a541c..cb6e0db 100644
--- a/ctrack/register/tests/test_event_models.py
+++ b/ctrack/register/tests/test_event_models.py
@@ -162,7 +162,7 @@ def test_event_type_enum():
)
-@pytest.mark.parametrize("allowed_type", [("PHONE_CALL"), ("MEETING"), ("VIDEO_CALL")])
+@pytest.mark.parametrize("allowed_type", ["PHONE_CALL", "MEETING", "VIDEO_CALL"])
def test_single_datetime_event(person, user, allowed_type):
"""This tests for phone call, video call and email events"""
now = datetime.datetime.now()
@@ -180,15 +180,18 @@ def test_single_datetime_event(person, user, allowed_type):
assert event.created_date.day == now.day
-def test_cannot_create_twin_date_event_model_end_date_precedes_start(user, caf):
+@pytest.mark.parametrize(
+ "allowed_type", ["CAF_PEER_REVIEW_PERIOD", "CAF_VALIDATION_PERIOD", "VIDEO_CALL"]
+)
+def test_cannot_create_twin_date_event_model_end_date_precedes_start(allowed_type, user, caf):
with pytest.raises(IntegrityError):
CAFTwinDateEvent.objects.create(
- type_descriptor="CAF_PEER_REVIEW_PERIOD",
+ type_descriptor=allowed_type,
related_caf=caf,
start_date="2010-10-10",
end_date="2010-01-01",
short_description="Bobbins",
- user=user
+ user=user,
)