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)
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)
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([]))
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)