Skip to content

Commit 8bb243e

Browse files
authored
Merge pull request #196 from hubmapconsortium/jpuerto/sharing
Jpuerto/sharing
2 parents d2733e2 + a1350a4 commit 8bb243e

File tree

9 files changed

+509
-31
lines changed

9 files changed

+509
-31
lines changed

src/tests/unittests/test_models.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from django.test import TestCase
22

3-
from user_workspaces_server.models import Job, Workspace
3+
from user_workspaces_server.models import Job, SharedWorkspaceMapping, Workspace
44

55

66
class WorkspaceModelTests(TestCase):
@@ -16,6 +16,8 @@ def test_get_workspace_dict_fields(self):
1616
"description",
1717
"disk_space",
1818
"datetime_created",
19+
"datetime_last_modified",
20+
"datetime_last_job_launch",
1921
"workspace_details",
2022
"status",
2123
"default_job_type",
@@ -46,3 +48,16 @@ def test_get_job_dict_fields(self):
4648
"core_hours",
4749
"job_details",
4850
]
51+
52+
53+
class SharedWorkspaceModelTests(TestCase):
54+
def test_get_shared_workspace_query_param_fields(self):
55+
"""Check Workspace query parameters"""
56+
assert SharedWorkspaceMapping.get_query_param_fields() == ["is_accepted"]
57+
58+
def test_get_shared_workspace_dict_fields(self):
59+
assert SharedWorkspaceMapping.get_dict_fields() == [
60+
"is_accepted",
61+
"last_resource_options",
62+
"last_job_type",
63+
]

0 commit comments

Comments
 (0)