forked from tableau/server-client-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_group_model.py
More file actions
24 lines (19 loc) · 765 Bytes
/
test_group_model.py
File metadata and controls
24 lines (19 loc) · 765 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
import unittest
import tableauserverclient as TSC
class GroupModelTests(unittest.TestCase):
def test_invalid_name(self):
self.assertRaises(ValueError, TSC.GroupItem, None)
self.assertRaises(ValueError, TSC.GroupItem, "")
group = TSC.GroupItem("grp")
with self.assertRaises(ValueError):
group.name = None
with self.assertRaises(ValueError):
group.name = ""
def test_invalid_minimum_site_role(self):
group = TSC.GroupItem("grp")
with self.assertRaises(ValueError):
group.minimum_site_role = "Captain"
def test_invalid_license_mode(self):
group = TSC.GroupItem("grp")
with self.assertRaises(ValueError):
group.license_mode = "off"