def _test_broken_context(self, runner):
        rally = utils.Rally()
        cfg = {
            "Dummy.dummy": [
                {
                    "args": {},
                    "runner": runner,
                    "context": {
                        "dummy_context": {"fail_setup": True}
                    }
                }
            ]}
        config = utils.TaskConfig(cfg)
        rally("task start --task %s" % config.filename)
        expected = [
            {"benchmark": "Dummy.dummy",
             "criterion": "something_went_wrong",
             "detail": mock.ANY,
             "pos": 0, "status": "FAIL"}
        ]
        try:
            rally("task sla_check --json", getjson=True)
        except utils.RallyCliError as expected_error:
            self.assertEqual(json.loads(expected_error.output), expected)
        else:
            self.fail("`rally task sla_check` command should return non-zero "
                      "exit code")
dataset/ETHPy150Open openstack/rally/tests/functional/test_cli_task.py/SLAExtraFlagsTestCase._test_broken_context/original