aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/register/tests/test_models.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-19 17:11:19 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-19 17:11:19 +0100
commitc07178fb19f55ea8354b2de153a2d41c66d58f32 (patch)
tree68c6e3f87a349fe7077e037fafdcaa1a7d9c79df /ctrack/register/tests/test_models.py
parentd8a07a2157c627c51a5dce963a92be87baf7c31d (diff)
started writing the code for the note event
Diffstat (limited to '')
-rw-r--r--ctrack/register/tests/test_models.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/ctrack/register/tests/test_models.py b/ctrack/register/tests/test_models.py
index e4f6a8d..aafd37f 100644
--- a/ctrack/register/tests/test_models.py
+++ b/ctrack/register/tests/test_models.py
@@ -7,7 +7,7 @@ from ctrack.register.models import (
EventType,
SingleDateTimeEvent,
CAFSingleDateEvent,
- CAFTwinDateEvent,
+ CAFTwinDateEvent, NoteEvent,
)
pytestmark = pytest.mark.django_db
@@ -150,7 +150,6 @@ def test_event_type_enum():
assert EventType.PHONE_CALL.name == "PHONE_CALL"
assert EventType.VIDEO_CALL.name == "VIDEO_CALL"
assert EventType.EMAIL.name == "EMAIL"
- assert EventType.NOTE.name == "NOTE"
assert EventType.CAF_INITIAL_CAF_RECEIVED.name == "CAF_INITIAL_CAF_RECEIVED"
assert EventType.CAF_FEEDBACK_EMAILED_OES.name == "CAF_FEEDBACK_EMAILED_OES"
assert EventType.CAF_RECEIVED.name == "CAF_RECEIVED"
@@ -220,15 +219,16 @@ def test_meeting_event(user, person):
assert e.modified_date.day == now.day
-@pytest.mark.parametrize("allowed_type", ["NOTE"])
-def test_note_event(user, allowed_type):
- e = SingleDateTimeEvent.objects.create(
- type_descriptor=allowed_type,
+def test_note_event(user, org):
+ e = NoteEvent.objects.create(
+ type_descriptor="NOTE",
short_description="Test short description",
- datetime="2020-10-10 10:30",
comments="The guy I deal with at X Co Ltd is made of cheese,",
+ organisation=org,
url="https://evidenceofcheese.com",
private=True,
user=user
)
- assert e.type_descriptor == allowed_type
+ assert e.type_descriptor == "NOTE"
+
+