Home
last modified time | relevance | path

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

/tools/test/connectivity/acts/framework/tests/libs/metrics/
Drecordable_metric_test.py48 def test_create_channel_stream(self, mock_open, mock_make_dirs, argument
54 mock_open.side_effect = self.get_mock_channel_stream
57 mock_open.assert_called_with(os.path.join(mock_path, "new.smetric"),
61 mock_open.assert_called_with(os.path.join(mock_path, "other.smetric"),
69 def test_create_channel_error_on_existing_stream(self, mock_open, argument
76 mock_open.side_effect = self.get_mock_channel_stream
84 def test_record_to_channel_stream(self, mock_open, argument
92 mock_open.side_effect = self.get_mock_channel_stream
111 def test_close_blobs_on_finished(self, mock_open, argument
119 mock_open.side_effect = self.get_mock_channel_stream
Djson_metric_test.py42 mock_open = mock.mock_open()
50 with patch('builtins.open', mock_open):
53 mock_open.assert_called_with(os.path.join(mock_path, 'raw.json'),
55 mock_open().write.assert_called_with(json.dumps(mock_json, indent=2))
/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(
/tools/acloud/internal/lib/
Dutils_test.py181 mock_open = mock.mock_open(read_data=public_key)
184 with mock.patch("__builtin__.open", mock_open):
Dgcompute_client_test.py1126 m = mock.mock_open(read_data=self.SSHKEY)
1246 m = mock.mock_open(read_data=self.SSHKEY)
/tools/asuite/aidegen/lib/
Dmodule_info_util_unittest.py189 def test_get_soong_build_json_dict_failed(self, mock_open): argument
191 mock_open.side_effect = IOError
/tools/tradefederation/core/atest/
Datest_unittest.py94 @mock.patch('__builtin__.open', new_callable=mock.mock_open)
146 @mock.patch('__builtin__.open', new_callable=mock.mock_open)
Dmodule_info_unittest.py65 @mock.patch('__builtin__.open', new_callable=mock.mock_open)