

@mock.patch.object(workbooks.WorkbookManager, 'validate', mock.MagicMock(return_value={
    'valid': True,
}))
def test_deprecated_callback_action(self):
    def_dict = self._read_yaml_file_as_json(WB_PRE_XFORM_PATH)
    def_dict['workflows']['main']['tasks']['callback'] = {
        'action': 'st2.callback',
    }
    def_yaml = yaml.safe_dump(def_dict)
    resp = self.__do_post(def_yaml)
    expected = [{
        'type': 'action',
        'path': None,
        'message': 'st2.callback is deprecated.',
    }]
    self.assertEqual(200, resp.status_int)
    def_yaml.assertListEqual(expected, resp.json)

dataset/ETHPy150Open StackStorm/st2/st2api/tests/unit/controllers/exp/test_validator_mistral.py MistralValidationControllerTest.test_deprecated_callback_action/VarMisuse@124/198 `self`->`def_yaml`