def test_host_friend_cancel(self, host, admin_user, host_adhoc): adhoc_command = AdHocCommand(inventory=host.inventory, created_by=admin_user) access = AdHocCommandAccess(host_adhoc) assert not access.can_cancel(adhoc_command)
def test_host_self_cancel(self, host, host_adhoc): adhoc_command = AdHocCommand(inventory=host.inventory, created_by=host_adhoc) access = AdHocCommandAccess(host_adhoc) assert access.can_cancel(adhoc_command)