Example #1
0
 def testGetMemberships(self):
     crowdserverstub.add_user_to_group(USER, GROUP)
     result = self.crowd.get_memberships()
     self.assertIsNotNone(result)
     self.assertTrue(GROUP in result)
     self.assertTrue(USER in result[GROUP][u'users'])
     crowdserverstub.remove_user_from_group(USER, GROUP)
Example #2
0
 def testGetMemberships(self):
     crowdserverstub.add_user_to_group(USER, GROUP)
     result = self.crowd.get_memberships()
     self.assertIsNotNone(result)
     self.assertTrue(GROUP in result)
     self.assertTrue(USER in result[GROUP][u'users'])
     crowdserverstub.remove_user_from_group(USER, GROUP)
Example #3
0
 def testGetNestedGroupUsersNotEmpty(self):
     crowdserverstub.add_user_to_group(USER, GROUP)
     result = self.crowd.get_nested_group_users(GROUP)
     self.assertEqual(set(result), set([USER]))
     crowdserverstub.remove_user_from_group(USER, GROUP)
Example #4
0
 def testRemoveUserFromGroup(self):
     crowdserverstub.add_user_to_group(USER, GROUP)
     crowdserverstub.remove_user_from_group(USER, GROUP)
     result = self.crowd.get_groups(USER)
     self.assertEqual(set(result), set([]))
Example #5
0
 def testGetGroupsNotEmpty(self):
     crowdserverstub.add_user_to_group(USER, GROUP)
     result = self.crowd.get_groups(USER)
     self.assertEqual(set(result), set([GROUP]))
     crowdserverstub.remove_user_from_group(USER, GROUP)
Example #6
0
 def testGetNestedGroupUsersNotEmpty(self):
     crowdserverstub.add_user_to_group(USER, GROUP)
     result = self.crowd.get_nested_group_users(GROUP)
     self.assertEqual(set(result), set([USER]))
     crowdserverstub.remove_user_from_group(USER, GROUP)
Example #7
0
 def testRemoveUserFromGroup(self):
     crowdserverstub.add_user_to_group(USER, GROUP)
     crowdserverstub.remove_user_from_group(USER, GROUP)
     result = self.crowd.get_groups(USER)
     self.assertEqual(set(result), set([]))
Example #8
0
 def testGetGroupsNotEmpty(self):
     crowdserverstub.add_user_to_group(USER, GROUP)
     result = self.crowd.get_groups(USER)
     self.assertEqual(set(result), set([GROUP]))
     crowdserverstub.remove_user_from_group(USER, GROUP)