From 0f781328ba20e3754e68998fae2919215460dd9b Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Wed, 29 Nov 2017 17:27:04 +0100 Subject: [PATCH] unit tests for contact_attempt to string methods --- smash/web/tests/models/test_contact_attempt.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 smash/web/tests/models/test_contact_attempt.py diff --git a/smash/web/tests/models/test_contact_attempt.py b/smash/web/tests/models/test_contact_attempt.py new file mode 100644 index 00000000..504cdb6a --- /dev/null +++ b/smash/web/tests/models/test_contact_attempt.py @@ -0,0 +1,17 @@ +import logging + +from django.test import TestCase + +from web.tests.functions import create_study_subject +from web.models import ContactAttempt +from web.tests import create_worker + +logger = logging.getLogger(__name__) + + +class ContactAttemptTests(TestCase): + def test_str(self): + contact_attempt = ContactAttempt(worker=create_worker(), subject=create_study_subject()) + + self.assertIsNotNone(str(contact_attempt)) + self.assertIsNotNone(unicode(contact_attempt)) -- GitLab