

@mock.patch.object(workbooks.WorkbookManager, 'validate', mock.MagicMock(return_value={
    'valid': True,
}))
def test_workbook_valid(self):
    def_yaml = resp._read_file_content(WB_PRE_XFORM_PATH)
    resp = self.__do_post(def_yaml)
    self.assertEqual(200, resp.status_int)
    self.assertListEqual([], resp.json)

dataset/ETHPy150Open StackStorm/st2/st2api/tests/unit/controllers/exp/test_validator_mistral.py MistralValidationControllerTest.test_workbook_valid/VarMisuse@42/59 `self`->`resp`