forked from tableau/server-client-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_project_model.py
More file actions
26 lines (20 loc) · 770 Bytes
/
test_project_model.py
File metadata and controls
26 lines (20 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import unittest
import tableauserverclient as TSC
class ProjectModelTests(unittest.TestCase):
def test_nullable_name(self):
TSC.ProjectItem(None)
TSC.ProjectItem("")
project = TSC.ProjectItem("proj")
project.name = None
def test_invalid_content_permissions(self):
project = TSC.ProjectItem("proj")
with self.assertRaises(ValueError):
project.content_permissions = "Hello"
def test_parent_id(self):
project = TSC.ProjectItem("proj")
project.parent_id = "foo"
self.assertEqual(project.parent_id, "foo")
def test_owner_id(self):
project = TSC.ProjectItem("proj")
with self.assertRaises(NotImplementedError):
project.owner_id = "new_owner"