Searched refs:mock_open (Results 1 – 8 of 8) sorted by relevance
/tools/test/connectivity/acts/framework/tests/libs/metrics/ |
D | recordable_metric_test.py | 48 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
|
D | json_metric_test.py | 42 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/ |
D | iperf_client_test.py | 86 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/ |
D | utils_test.py | 181 mock_open = mock.mock_open(read_data=public_key) 184 with mock.patch("__builtin__.open", mock_open):
|
D | gcompute_client_test.py | 1126 m = mock.mock_open(read_data=self.SSHKEY) 1246 m = mock.mock_open(read_data=self.SSHKEY)
|
/tools/asuite/aidegen/lib/ |
D | module_info_util_unittest.py | 189 def test_get_soong_build_json_dict_failed(self, mock_open): argument 191 mock_open.side_effect = IOError
|
/tools/tradefederation/core/atest/ |
D | atest_unittest.py | 94 @mock.patch('__builtin__.open', new_callable=mock.mock_open) 146 @mock.patch('__builtin__.open', new_callable=mock.mock_open)
|
D | module_info_unittest.py | 65 @mock.patch('__builtin__.open', new_callable=mock.mock_open)
|