From d4431a7c4a31b05356fd1efc9e5cc91dda58ad4b Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sat, 10 Oct 2020 16:36:31 +0100 Subject: small tidy --- ctrack/register/models.py | 1 + ctrack/register/tests/test_engagement_events.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ctrack/register/models.py b/ctrack/register/models.py index c94e440..949c8d0 100644 --- a/ctrack/register/models.py +++ b/ctrack/register/models.py @@ -34,6 +34,7 @@ class AuditableEventBase(models.Model): abstract = True def save(self, *args, **kwargs): + """Overriding so we can save the dates in here.""" if not self.pk: self.created_date = datetime.datetime.now() self.modified_date = datetime.datetime.now() diff --git a/ctrack/register/tests/test_engagement_events.py b/ctrack/register/tests/test_engagement_events.py index a63c146..ee44a9a 100644 --- a/ctrack/register/tests/test_engagement_events.py +++ b/ctrack/register/tests/test_engagement_events.py @@ -1,7 +1,6 @@ import datetime import pytest -from django.contrib.auth import get_user_model from ctrack.register.models import MeetingEvent @@ -17,7 +16,7 @@ def test_meeting_event(person, user): datetime="2020-10-10T15:00", comments="Nice comments", location="Harvey's House", - user = user + user=user ) e.participants.add(person) assert len(e.participants.all()) == 1 -- cgit v1.2.3