def test_cancelation_completed_with_error(self):
        with client.test_mode as t:
            t.register('/jobs/42/cancel/', '', method='POST', status_code=405)
            with self.assertRaises(exc.TowerCLIError):
                self.res.cancel(42, fail_if_not_running=True)
Establish that a standard cancelation command works in the way
dataset/ETHPy150Open ansible/tower-cli/tests/test_resources_job.py/CancelTests.test_cancelation_completed_with_error