def test_remove_admin(self): # Get a dataset owned by bob sc.auth(self.sock, 'bob', 'bob') dsets = sc.lst(self.sock)['list'] test_elt = dsets[0] cop_elt = test_elt+'copied' sc.copy(self.sock, test_elt, cop_elt) # Verify the copied element is there dsets = sc.lst(self.sock)['list'] self.assertIn(cop_elt, dsets, "Other user's dataset not copied!") # Rename the dataset sc.auth(self.sock, 'lev', 'lev') sc.remove_admin(self.sock, cop_elt, 'bob') # Verify the rename sc.auth(self.sock, 'bob', 'bob') dsets = sc.lst(self.sock)['list'] self.assertNotIn(cop_elt, dsets, "Other user's dataset not removed!") # Put things back the way they were sc.auth(self.sock, 'lev', 'lev')