File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
integration/tests/posit/connect Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,23 @@ def test_get(self):
4747 assert self .client .users .get (self .bill ["guid" ]) == self .bill
4848 assert self .client .users .get (self .cole ["guid" ]) == self .cole
4949
50+ # Also tests Groups.members
51+ def test_groups (self ):
52+ try :
53+ unit_friends = self .client .groups .create (name = "UnitFriends" )
54+ self .client .post (
55+ f"/v1/groups/{ unit_friends ['guid' ]} /members" ,
56+ json = {"user_guid" : self .bill ["guid" ]},
57+ )
58+ bill_groups = self .bill .groups .find ()
59+ assert len (bill_groups ) == 1
60+ assert bill_groups [0 ]["guid" ] == unit_friends ["guid" ]
61+ finally :
62+ groups = self .client .groups .find (prefix = "UnitFriends" )
63+ if len (groups ) > 0 :
64+ unit_friends = groups [0 ]
65+ unit_friends .delete ()
66+
5067
5168class TestUserContent :
5269 """Checks behavior of the content attribute."""
Original file line number Diff line number Diff line change @@ -166,9 +166,7 @@ def test_groups(self):
166166 assert len (users ) == 2 + 2
167167
168168 carlos = client .users .get (carlos_guid )
169- print ("carlos.guid" , carlos ["guid" ])
170169 no_groups = carlos .groups .find ()
171- print ("no_groups" , no_groups )
172170 assert len (no_groups ) == 0
173171
174172 user = users [1 ]
You can’t perform that action at this time.
0 commit comments