aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/users/tests/test_models.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-05-24 21:11:40 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-05-24 21:11:40 +0100
commit4aaa68109434e04d1103710d675efd075b2f744a (patch)
tree230e0c464939e828df2ab51fca65d228e44f01cd /ctrack/users/tests/test_models.py
parent708b983c9cb0895ae0d205013d46a17020c4ef73 (diff)
added basic stakeholder profile model
Diffstat (limited to '')
-rw-r--r--ctrack/users/tests/test_models.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/ctrack/users/tests/test_models.py b/ctrack/users/tests/test_models.py
index c429b9c..2d45cca 100644
--- a/ctrack/users/tests/test_models.py
+++ b/ctrack/users/tests/test_models.py
@@ -1,16 +1,25 @@
import pytest
-from ctrack.users.models import User
+from ctrack.users.stakeholder import Stakeholder
pytestmark = pytest.mark.django_db
-def test_user_get_absolute_url(user: User):
+def test_user_get_absolute_url(user):
assert user.get_absolute_url() == f"/users/{user.username}/"
-def test_user_is_person_object(user: User):
+def test_user_is_person_object(user):
"""User comes from ctrack.conftest.
"""
assert user
+
+
+def test_stakeholder_model(person):
+ """
+ A stakeholder is someone who is part of the regime but also has user access to the
+ the system.
+ """
+ stakeholder = Stakeholder(person=person)
+ assert stakeholder