aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/register
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-10 16:31:30 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-10 16:31:30 +0100
commitec66703476712e4c63990ff5cb3b6a72e92cb7bb (patch)
tree824eb895f5201faedc9bb5c6ed9c6e40f02a9e83 /ctrack/register
parent41f7fa0164523b574da0ee2c0dc2dc0e6f1a614e (diff)
added auditable model for Events
Diffstat (limited to 'ctrack/register')
-rw-r--r--ctrack/register/tests/test_engagement_events.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ctrack/register/tests/test_engagement_events.py b/ctrack/register/tests/test_engagement_events.py
index 3cbeafe..a63c146 100644
--- a/ctrack/register/tests/test_engagement_events.py
+++ b/ctrack/register/tests/test_engagement_events.py
@@ -1,3 +1,5 @@
+import datetime
+
import pytest
from django.contrib.auth import get_user_model
@@ -8,6 +10,7 @@ pytestmark = pytest.mark.django_db
def test_meeting_event(person, user):
uname = user.name
+ now = datetime.datetime.now()
e = MeetingEvent.objects.create(
type_descriptor="Meeting",
short_description="Big Important Meeting",
@@ -21,3 +24,7 @@ def test_meeting_event(person, user):
assert e.type_descriptor == "Meeting"
assert person in e.participants.all()
assert e.user.name == uname
+ assert e.created_date.day == now.day
+ assert e.created_date.hour == now.hour
+ assert e.modified_date.day == now.day
+ assert e.modified_date.hour == now.hour