Home
last modified time | relevance | path

Searched refs:mock_open (Results 1 – 17 of 17) sorted by relevance

/tools/test/connectivity/acts/framework/tests/controllers/
Diperf_client_test.py86 def test_start_writes_to_full_file_path(self, mock_call, mock_open): argument
93 mock_open.assert_called_with(file_path, 'w')
96 mock_open().__enter__.return_value,
105 def test_start_writes_output_to_full_file_path(self, mock_open): argument
113 mock_open.assert_called_with(file_path, 'w')
114 mock_open().__enter__().write.assert_called_with(
123 def test_start_writes_output_to_full_file_path(self, mock_open): argument
134 mock_open.assert_called_with(file_path, 'w')
135 mock_open().__enter__().write.assert_called_with('output')
/tools/test/connectivity/acts/framework/tests/controllers/bits_lib/
Dbits_service_test.py31 def test_output_log_opens_on_creation(self, mock_open, *_): argument
34 mock_open.assert_called_with('log_path', 'w')
38 def test_output_log_gets_closed_on_cleanup(self, _, __, mock_open, *___): argument
40 mock_open.return_value = mock_log
/tools/acloud/internal/lib/
Dcvd_utils_test.py63 mock_open = mock.mock_open(read_data="super.img\nbootloader\nkernel")
64 with mock.patch("acloud.internal.lib.cvd_utils.open", mock_open):
66 mock_open.assert_called_with("/mock/dir/required_images", "r",
Dcvd_runtime_config_test.py90 mock_open = mock.mock_open(read_data=self.CF_RUNTIME_CONFIG)
92 with mock.patch("builtins.open", mock_open):
Dutils_test.py190 mock_open = mock.mock_open(read_data=public_key)
193 with mock.patch("builtins.open", mock_open):
Dandroid_build_client_test.py236 mock.mock_open(read_data=certification)):
Dgcompute_client_test.py1252 m = mock.mock_open(read_data=self.SSHKEY)
1372 m = mock.mock_open(read_data=self.SSHKEY)
/tools/acloud/create/
Dlocal_image_local_instance_test.py471 self.Patch(builtins, "open", mock.mock_open())
500 self.Patch(builtins, "open", mock.mock_open())
516 self.Patch(builtins, "open", mock.mock_open())
550 mock_open = mock.mock_open(read_data="config=phone")
552 with mock.patch("builtins.open", mock_open):
/tools/acloud/public/actions/
Dremote_instance_fvp_device_factory_test.py75 mock_open = mock.mock_open(read_data = (
81 with mock.patch("builtins.open", mock_open):
/tools/asuite/aidegen/lib/
Dconfig_unittest.py205 def test_deprecated_intellij_version(self, mock_open, mock_isfile): argument
212 mock_open.side_effect = [
213 mock.mock_open(read_data=expacted_data).return_value
222 mock_open.side_effect = [
223 mock.mock_open(read_data=expacted_data).return_value
Dcommon_util_unittest.py252 def test_read_file_content(self, mock_open): argument
256 mock_open.side_effect = [
257 mock.mock_open(read_data=expacted_data1).return_value
260 mock_open.assert_called_once_with(file_a, encoding='utf8')
Dclion_project_file_gen_unittest.py499 def test_generate_cmakelists_file(self, mock_write, mock_open, mock_exists): argument
507 self.assertTrue(mock_open.called)
/tools/test/connectivity/acts_tests/acts_contrib/test_utils_tests/power/tel/lab/
Dsave_summary_to_file_test.py19 from unittest.mock import mock_open
51 m = mock_open()
/tools/asuite/atest-py2/
Datest_unittest.py97 @mock.patch('__builtin__.open', new_callable=mock.mock_open)
149 @mock.patch('__builtin__.open', new_callable=mock.mock_open)
Dmodule_info_unittest.py65 @mock.patch('__builtin__.open', new_callable=mock.mock_open)
/tools/asuite/atest/
Datest_unittest.py101 @mock.patch('builtins.open', new_callable=mock.mock_open)
155 @mock.patch('builtins.open', new_callable=mock.mock_open)
Dmodule_info_unittest.py98 @mock.patch('builtins.open', new_callable=mock.mock_open)