diff options
author | Matthew Lemon <y@yulqen.org> | 2024-10-14 16:43:17 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-10-14 16:43:17 +0100 |
commit | cb9f0fad4140c9cfff63f056f88da1b8bdb2f9cc (patch) | |
tree | 8d88ffe146efffe47e22d1a79ef5757621c9aa38 /instruments/tests/test_models.py | |
parent | 41cf37ac30e2efac6427a4f126954a442579bc41 (diff) |
Adds basic SOP model and adds it to admin
Diffstat (limited to 'instruments/tests/test_models.py')
-rw-r--r-- | instruments/tests/test_models.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/instruments/tests/test_models.py b/instruments/tests/test_models.py index 7762dde..4bf05f8 100644 --- a/instruments/tests/test_models.py +++ b/instruments/tests/test_models.py @@ -4,6 +4,8 @@ import pytest from engagements import models from engagements.utils import populate_database +from instruments.models import SOP +from myuser.models import TeamUser pytestmark = pytest.mark.django_db @@ -13,6 +15,17 @@ def test_data(): return populate_database() +def test_sop(): + user = TeamUser.objects.create_user(email="ming@mingy.com") + sop = SOP.objects.create( + name="SOP 1", + designation="SOP1", + sp_link="https://example.com", + draft_status="Draft", + author_lead=user, + ) + + class TestModels: def test_check_all_dcs(self, test_data): dscs = test_data.get("sub_instruments") |