Home
last modified time | relevance | path

Searched refs:assert_called_with (Results 1 – 25 of 50) sorted by relevance

12

/external/python/mock/mock/tests/
Dtesthelpers.py33 mock.assert_called_with(ANY)
37 mock.assert_called_with(foo=ANY)
48 mock.assert_called_with(ANY, foo=ANY)
321 mock.one.assert_called_with(1, 2)
323 mock.one.assert_called_with, 3, 4)
327 mock.two.assert_called_with()
329 mock.two.assert_called_with, 3)
333 mock.three.assert_called_with()
335 mock.three.assert_called_with, 3)
339 mock.three.assert_called_with(1)
[all …]
Dtestmock.py163 mock.assert_called_with(1, 2, fish=3)
223 mock.assert_called_with(1,2, fish=3)
336 mock.assert_called_with()
337 self.assertRaises(AssertionError, mock.assert_called_with, 1)
340 self.assertRaises(AssertionError, mock.assert_called_with)
343 mock.assert_called_with(1, 2, 3, a='fish', b='nothing')
353 mock.assert_called_with(1, 2, 3)
354 mock.assert_called_with(a=1, b=2, c=3)
355 self.assertRaises(AssertionError, mock.assert_called_with,
359 mock.assert_called_with(e=8)
[all …]
Dtestwith.py82 mock.__enter__.assert_called_with()
83 mock.__exit__.assert_called_with(None, None, None)
92 mock.__enter__.assert_called_with()
/external/python/cpython3/Lib/unittest/test/testmock/
Dtesthelpers.py31 mock.assert_called_with(ANY)
35 mock.assert_called_with(foo=ANY)
46 mock.assert_called_with(ANY, foo=ANY)
340 mock.one.assert_called_with(1, 2)
342 mock.one.assert_called_with, 3, 4)
346 mock.two.assert_called_with()
348 mock.two.assert_called_with, 3)
352 mock.three.assert_called_with()
354 mock.three.assert_called_with, 3)
358 mock.three.assert_called_with(1)
[all …]
Dtestmock.py139 mock.assert_called_with(1, 2, fish=3)
199 mock.assert_called_with(1,2, fish=3)
334 mock.assert_called_with()
335 self.assertRaises(AssertionError, mock.assert_called_with, 1)
338 self.assertRaises(AssertionError, mock.assert_called_with)
341 mock.assert_called_with(1, 2, 3, a='fish', b='nothing')
347 m.assert_called_with(mock.ANY)
357 mock.assert_called_with(1, 2, 3)
358 mock.assert_called_with(a=1, b=2, c=3)
359 self.assertRaises(AssertionError, mock.assert_called_with,
[all …]
Dtestwith.py77 mock.__enter__.assert_called_with()
78 mock.__exit__.assert_called_with(None, None, None)
87 mock.__enter__.assert_called_with()
/external/python/cpython3/Lib/test/test_asyncio/
Dtest_proactor_events.py51 self.proactor.recv.assert_called_with(self.sock, 32768)
56 self.loop._proactor.recv.assert_called_with(self.sock, 32768)
67 self.loop._proactor.recv.assert_called_with(self.sock, 32768)
68 self.protocol.data_received.assert_called_with(b'data')
90 tr._fatal_error.assert_called_with(
120 tr._force_close.assert_called_with(err)
128 tr._fatal_error.assert_called_with(
137 tr._loop_writing.assert_called_with(data=b'data')
156 self.loop._proactor.send.assert_called_with(self.sock, b'data')
158 assert_called_with(tr._loop_writing)
[all …]
Dtest_selector_events.py144 selector.close.assert_called_with()
145 ssock.close.assert_called_with()
146 csock.close.assert_called_with()
147 remove_reader.assert_called_with(7)
449 m_gai.assert_called_with(
453 sock.connect.assert_called_with(('127.0.0.1', 0))
728 self.loop._add_callback.assert_called_with(reader)
739 self.loop._remove_reader.assert_called_with(1)
750 self.loop._add_callback.assert_called_with(writer)
761 self.loop._remove_writer.assert_called_with(1)
[all …]
Dtest_unix_events.py67 self.loop.remove_signal_handler.assert_called_with(signal.NSIG + 1)
662 self.protocol.connection_made.assert_called_with(tr)
672 m_read.assert_called_with(5, tr.max_size)
673 self.protocol.data_received.assert_called_with(b'data')
681 m_read.assert_called_with(5, tr.max_size)
684 self.protocol.eof_received.assert_called_with()
685 self.protocol.connection_lost.assert_called_with(None)
693 m_read.assert_called_with(5, tr.max_size)
706 m_read.assert_called_with(5, tr.max_size)
707 tr._close.assert_called_with(err)
[all …]
Dtest_base_events.py572 log.error.assert_called_with(
582 log.error.assert_called_with(
604 log.error.assert_called_with(
609 log.error.assert_called_with(
635 mock_handler.assert_called_with(self.loop, {
647 log.error.assert_called_with(
670 log.error.assert_called_with(
701 log.error.assert_called_with(
712 log.error.assert_called_with(
1270 sock.connect.assert_called_with(('1.2.3.4', 80))
[all …]
/external/toolchain-utils/crosperf/
Ddownload_images_unittest.py53 mock_path_exists.assert_called_with(
61 mock_mkdirs.assert_called_with(
72 mock_cmd_exec.RunCommand.assert_called_with(expected_args)
84 mock_path_exists.assert_called_with(
113 mock_path_exists.assert_called_with(
150 mock_path_exists.assert_called_with(
Dbenchmark_run_unittest.py393 br.machine_manager.ImageMachine.assert_called_with(mock_machine,
396 mock_runner.assert_called_with(mock_machine.name, br.label, br.benchmark,
400 mock_result.assert_called_with(
/external/python/oauth2client/tests/contrib/
Dtest_locked_file.py163 mock_sleep.assert_called_with(1)
193 opener_mock.assert_called_with('a_file', 'r+', 'r')
201 _win32_opener_mock._Win32Opener.assert_called_with('a_file', 'r+', 'r')
210 _fnctl_opener_mock._FcntlOpener.assert_called_with('a_file', 'r+', 'r')
219 opener_mock.assert_called_with('a_file', 'r+', 'r')
239 opener.open_and_lock.assert_called_with(0, 0.05)
244 opener.unlock_and_close.assert_called_with()
Dtest_gce.py80 get_token.assert_called_with(http_request,
85 get_token.assert_called_with(http_request,
/external/autotest/site_utils/
Ddeploy_server_local_unittest.py128 run_cmd.assert_called_with(
173 run_cmd.assert_called_with('sudo service apache2 reload', shell=True,
179 run_cmd.assert_called_with(expected_cmd, shell=True,
198 run_cmd.assert_called_with(['sudo', 'service', 'foobar', 'restart'],
209 run_cmd.assert_called_with(['sudo', 'service', 'foobar', 'status'])
311 run_cmd.assert_called_with(
Dautomated_deploy_unittest.py120 run_cmd.assert_called_with(expect_git_log_cmd, stream_output=True)
130 run_cmd.assert_called_with(expect_git_log_cmd, stream_output=True)
Dhwid_lib_unittest.py131 mock_urlopen.assert_called_with(expected_url)
152 mock_urlopen.assert_called_with(expected_url)
/external/autotest/server/hosts/
Djetstream_host_unittest.py21 mock_cleanup.assert_called_with()
30 mock_cleanup.assert_called_with()
/external/autotest/client/cros/multimedia/
Dcfm_facade_native_unittest.py53 mock_kiosk_utils.wait_for_kiosk_ext.assert_called_with(self.browser,
63 mock_kiosk_utils.get_webview_contexts.assert_called_with(self.browser,
125 dummy_ctx.ExecuteJavaScript.assert_called_with(
/external/python/cpython3/Lib/idlelib/idle_test/
Dtest_squeezer.py165 orig_write.assert_called_with(text, ())
179 orig_write.assert_called_with(text, "stderr")
194 orig_write.assert_called_with(text, "stdout")
354 MockHovertip.assert_called_with(expandingbutton, ANY, hover_delay=ANY)
390 squeezer.expandingbuttons.remove.assert_called_with(expandingbutton)
450 expandingbutton.clipboard_append.assert_called_with('TEXT')
Dtest_colorizer.py210 mock_notify.assert_called_with('1.0', '1.0+3c')
214 mock_notify.assert_called_with('1.3', '1.3+6c')
225 mock_notify.assert_called_with('1.7')
229 mock_notify.assert_called_with('1.3')
/external/autotest/server/cros/network/
Drf_switch_utils_test.py52 mock_logger.assert_called_with(
62 mock_logger.assert_called_with(
Drf_switch_controller_test.py78 mock_logger.assert_called_with(
93 mock_logger.assert_called_with(
/external/python/cpython3/Lib/test/
Dtest_getpass.py121 tcsetattr.assert_called_with(3, mock.ANY, fake_attrs)
147 mock_stream.flush.assert_called_with()
/external/python/cpython3/Doc/library/
Dunittest.mock-examples.rst41 ``True``. More importantly we can use the :meth:`~Mock.assert_called_with` or
83 >>> mock.close.assert_called_with()
87 accessing it in the test will create it, but :meth:`~Mock.assert_called_with`
298 >>> mock.assert_called_with(a=1, b=2, c=3)
357 >>> mock.assert_called_with('filename', 'r')
388 ... mock_method.assert_called_with()
433 >>> mock_method.assert_called_with(1, 2, 3)
464 >>> mock.return_value.foo.assert_called_with(a=2, b=3)
711 >>> mock.foo_bar.assert_called_with('baz', spam='eggs')
724 Both ``assert_called_with`` and ``assert_called_once_with`` make assertions about
[all …]

12