Lines Matching refs:mock
10 import mock
53 cloader_mock = mock.Mock()
54 loader_mock = mock.Mock()
55 csafeloader_mock = mock.Mock()
56 safeloader_mock = mock.Mock()
57 cdumper_mock = mock.Mock()
58 dumper_mock = mock.Mock()
72 with mock.patch.dict('sys.modules', modules_mock, clear=True), \
73 mock.patch('sys.meta_path', meta_path_mock):
112 with mock.patch.dict('sys.modules', modules_mock, clear=True), \
113 mock.patch('sys.meta_path', meta_path_mock):
123 assert scl._yaml_validate(mock.Mock(), mock.Mock()) is None
139 result_mock = mock.Mock()
143 context_mark = mock.Mock()
144 problem_mark = mock.Mock()
145 type(context_mark).args = mock.PropertyMock(return_value=[])
149 type(problem_mark).args = mock.PropertyMock(return_value=[])
160 with mock.patch('yaml.load', side_effect=mock_load), \
161 mock.patch('builtins.open', mock.mock_open()) as mock_file:
189 schema_mock = mock.Mock()
190 data_mock = mock.Mock()
205 with mock.patch('scl.yaml_load', side_effect=mock_load), \
206 mock.patch('scl._yaml_validate', side_effect=mock_validate), \
226 data_mock = mock.Mock()
227 schema_mock = mock.Mock() if schema_exists else None
238 return mock.Mock(validate=mock_validate)
240 core_mock = mock.Mock(side_effect=mock_core)
242 with mock.patch('pykwalify.core.Core', core_mock), \