def test_project_dnd_as_manager(self): for i in (0, 1, 3): change_ownership(self.links[i], testing.SITE_ADMIN) self.set_up_test_project_as_manager() # can't dnd from/to featured group self.assert_can_not_drag_drop(self.groups[0], self.groups[3]) self.assert_can_not_drag_drop(self.groups[3], self.groups[0]) # can dnd from local to local self.assert_can_drag_drop(self.groups[0], self.groups[1])
def test_project_workspace_dnd_as_project_member(self): for i in (2, 3, 5): change_ownership(self.links[i], self.project_member) self.set_up_test_project_workspace_as_project_member() # can't dnd from/to featured foreign self.assert_can_not_drag_drop(self.groups[5], self.groups[2]) self.assert_can_not_drag_drop(self.groups[2], self.groups[5]) # can dnd from local to local self.assert_can_not_drag_drop(self.groups[2], self.groups[3])
def test_project_dnd_as_member(self): for i in (1, 3): change_ownership(self.links[i], self.project_member) self.set_up_test_project_as_member() # can't dnd from/to featured group self.assert_can_not_drag_drop(self.groups[3], self.groups[1]) self.assert_can_not_drag_drop(self.groups[1], self.groups[3]) # can't dnd from local to local self.assert_can_not_drag_drop(self.groups[1], self.groups[1])
def test_project_workspace_dnd_as_member(self): for i in (2, 3, 5): change_ownership(self.links[i], self.workspace_member) # from zope.lifecycleevent import modified # modified(self.links[i]) self.set_up_test_project_workspace_as_member() # can't dnd from/to featured foreign self.assert_can_not_drag_drop(self.groups[5], self.groups[2]) self.assert_can_not_drag_drop(self.groups[2], self.groups[5]) # can dnd from local to local self.assert_can_drag_drop(self.groups[2], self.groups[3])