diff options
Diffstat (limited to '')
-rw-r--r-- | ctrack/register/tests/test_event_models.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ctrack/register/tests/test_event_models.py b/ctrack/register/tests/test_event_models.py index 39b501c..61a541c 100644 --- a/ctrack/register/tests/test_event_models.py +++ b/ctrack/register/tests/test_event_models.py @@ -180,6 +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): + with pytest.raises(IntegrityError): + CAFTwinDateEvent.objects.create( + type_descriptor="CAF_PEER_REVIEW_PERIOD", + related_caf=caf, + start_date="2010-10-10", + end_date="2010-01-01", + short_description="Bobbins", + user=user + ) + + def test_meeting_event(user, person): uname = user.name now = datetime.datetime.now() |