Home
last modified time | relevance | path

Searched refs:patch (Results 1 – 25 of 136) sorted by relevance

123456

/tools/test/connectivity/acts/framework/tests/libs/uicd/
Duicd_cli_test.py37 @mock.patch('os.walk', _mock_walk)
38 @mock.patch('os.makedirs')
39 @mock.patch('tempfile.mkdtemp')
40 @mock.patch('shutil.rmtree')
41 @mock.patch.object(UicdCli, '_setup_cli')
50 @mock.patch('os.walk', _mock_walk)
51 @mock.patch('os.makedirs')
52 @mock.patch('tempfile.mkdtemp')
53 @mock.patch('shutil.rmtree')
54 @mock.patch.object(UicdCli, '_setup_cli')
[all …]
/tools/asuite/aidegen/lib/
Dmodule_info_util_unittest.py79 @mock.patch.object(os.path, 'getmtime')
80 @mock.patch.object(logging, 'info')
81 @mock.patch.object(os.path, 'isfile')
82 @mock.patch.object(module_info_util, '_get_generated_json_files')
97 @mock.patch.object(module_info_util, '_show_build_failed_message')
98 @mock.patch.object(module_info_util, '_show_files_reuse_message')
99 @mock.patch.object(atest_utils, 'build')
100 @mock.patch.object(os.path, 'getmtime')
101 @mock.patch.object(logging, 'warning')
102 @mock.patch.object(os.path, 'isfile')
[all …]
Dide_util_unittest.py104 @mock.patch.object(ide_util, '_get_linux_ide')
105 @mock.patch.object(ide_util, '_get_mac_ide')
113 @mock.patch.object(ide_util.IdeBase, '_get_user_preference')
114 @mock.patch.object(config.AidegenConfig, 'set_preferred_version')
115 @mock.patch.object(ide_util.IdeEclipse, '_get_script_from_system')
116 @mock.patch.object(ide_util.IdeIntelliJ, '_get_preferred_version')
141 @mock.patch.object(ide_util.IdeIntelliJ, '_set_installed_path')
142 @mock.patch.object(ide_common_util, 'get_script_from_input_path')
143 @mock.patch.object(ide_util.IdeIntelliJ, '_get_script_from_system')
157 @mock.patch.object(ide_util.IdeIntelliJ, '_get_preferred_version')
[all …]
Dconfig_unittest.py56 @mock.patch('json.load')
57 @mock.patch('builtins.open')
58 @mock.patch('os.path.exists')
73 @mock.patch('logging.info')
74 @mock.patch('logging.error')
75 @mock.patch('builtins.open')
76 @mock.patch('os.path.exists')
92 @mock.patch('json.dump')
93 @mock.patch('builtins.open')
94 @mock.patch.object(config.AidegenConfig, '_is_config_modified')
[all …]
Dnative_module_info_unittest.py107 @mock.patch.object(
109 @mock.patch.object(common_util, 'get_related_paths')
118 @mock.patch.object(
127 @mock.patch.object(
136 @mock.patch.object(logging, 'warning')
137 @mock.patch.object(
146 @mock.patch.object(logging, 'warning')
147 @mock.patch.object(
156 @mock.patch.object(native_module_info.NativeModuleInfo,
158 @mock.patch.object(native_module_info.NativeModuleInfo,
[all …]
Dproject_file_gen_unittest.py76 @mock.patch.object(project_config, 'ProjectConfig')
77 @mock.patch.object(project_info, 'ProjectInfo')
104 @mock.patch.object(project_file_gen, '_get_all_git_path')
105 @mock.patch.object(xml_gen, 'write_ignore_git_dirs_file')
106 @mock.patch.object(xml_gen, 'gen_vcs_xml')
107 @mock.patch.object(common_util, 'get_android_root_dir')
108 @mock.patch.object(common_util, 'find_git_root')
109 @mock.patch.object(project_info, 'ProjectInfo')
128 @mock.patch.object(project_info, 'ProjectInfo')
151 @mock.patch.object(logging, 'error')
[all …]
Dproject_info_unittest.py109 @mock.patch('atest.module_info.ModuleInfo')
120 @mock.patch.object(project_info.ProjectInfo,
122 @mock.patch.object(project_info.ProjectInfo, 'get_dep_modules')
129 @mock.patch.object(common_util, 'get_android_root_dir')
144 @mock.patch.object(common_util, 'get_android_root_dir')
145 @mock.patch('atest.module_info.ModuleInfo')
146 @mock.patch('atest.atest_utils.build')
185 @mock.patch.object(project_info, 'batch_build_dependencies')
186 @mock.patch.object(common_util, 'get_android_root_dir')
187 @mock.patch('atest.module_info.ModuleInfo')
[all …]
Dcommon_util_unittest.py53 @mock.patch('os.getcwd')
54 @mock.patch('os.path.isabs')
55 @mock.patch.object(common_util, 'get_android_root_dir')
94 @mock.patch('os.getcwd')
95 @mock.patch.object(common_util, 'is_android_root')
96 @mock.patch.object(common_util, 'get_android_root_dir')
136 @mock.patch.object(common_util, 'is_android_root')
137 @mock.patch.object(common_util, 'get_related_paths')
152 @mock.patch.object(common_util, 'get_android_root_dir')
153 @mock.patch.object(common_util, 'has_build_target')
[all …]
/tools/test/connectivity/acts/framework/tests/controllers/
Diperf_server_test.py57 @mock.patch('acts.controllers.iperf_server.utils')
93 @mock.patch('os.makedirs')
121 @mock.patch('builtins.open')
122 @mock.patch('acts.controllers.iperf_server.subprocess')
123 @mock.patch('acts.controllers.iperf_server.job')
132 @mock.patch('builtins.open')
133 @mock.patch('acts.controllers.iperf_server.subprocess')
134 @mock.patch('acts.controllers.iperf_server.job')
145 @mock.patch('builtins.open')
146 @mock.patch('acts.controllers.iperf_server.subprocess')
[all …]
/tools/test/connectivity/acts/framework/tests/controllers/pdu_lib/synaccess/
Dnp02b_test.py20 from unittest.mock import patch
46 @patch('acts.controllers.pdu_lib.synaccess.np02b.time.sleep')
47 @patch('acts.controllers.pdu_lib.synaccess.np02b.telnetlib')
57 @patch('acts.controllers.pdu_lib.synaccess.np02b.time.sleep')
58 @patch('acts.controllers.pdu_lib.synaccess.np02b.telnetlib')
69 @patch('acts.controllers.pdu_lib.synaccess.np02b.time.sleep')
70 @patch('acts.controllers.pdu_lib.synaccess.np02b.telnetlib')
81 @patch('acts.controllers.pdu_lib.synaccess.np02b.time.sleep')
82 @patch('acts.controllers.pdu_lib.synaccess.np02b.telnetlib')
95 @patch('acts.controllers.pdu_lib.synaccess.np02b._TNHelperNP02B.cmd')
[all …]
/tools/acloud/setup/
Dgcp_setup_runner_test.py88 with mock.patch("os.path.isfile") as chkfile:
96 @mock.patch("os.path.dirname", return_value="")
97 @mock.patch("subprocess.check_output")
108 @mock.patch.object(six.moves, "input")
118 @mock.patch.object(gcp_setup_runner, "UpdateConfigFile")
119 @mock.patch.object(utils, "CreateSshKeyPairIfNotExist")
128 with mock.patch('os.path.expanduser') as ssh_path:
143 @mock.patch.object(gcp_setup_runner.GcpTaskRunner, "_CreateStableHostImage")
144 @mock.patch.object(gcp_setup_runner.GcpTaskRunner, "_EnableGcloudServices")
145 @mock.patch.object(gcp_setup_runner.GcpTaskRunner, "_SetupProject")
[all …]
/tools/test/connectivity/acts/framework/tests/controllers/monsoon_lib/api/lvpm_stock/
Dmonsoon_test.py40 self.sleep_patch = mock.patch('time.sleep')
43 self.mp_manager_patch = mock.patch('multiprocessing.Manager')
48 self.monsoon_proxy = mock.patch(
57 @mock.patch(DOWNSAMPLER_IMPORT)
58 @mock.patch(ASSEMBLY_LINE_IMPORT)
72 @mock.patch(DOWNSAMPLER_IMPORT)
73 @mock.patch(ASSEMBLY_LINE_IMPORT)
87 @mock.patch(TEE_IMPORT)
88 @mock.patch(ASSEMBLY_LINE_IMPORT)
101 @mock.patch(TEE_IMPORT)
[all …]
/tools/test/connectivity/acts/framework/tests/controllers/ap_lib/
Dradvd_test.py20 from unittest.mock import patch
102 @patch('acts.controllers.utils_lib.commands.shell.ShellCommand.kill')
108 @patch('acts.controllers.utils_lib.commands.shell.ShellCommand.is_alive')
114 @patch('acts.controllers.utils_lib.commands.shell.ShellCommand.is_alive')
120 @patch('acts.controllers.ap_lib.radvd.Radvd._scan_for_errors')
121 @patch('acts.controllers.ap_lib.radvd.Radvd.is_alive')
129 @patch('acts.controllers.ap_lib.radvd.Radvd.is_alive')
130 @patch(SEARCH_FILE)
139 @patch('acts.controllers.ap_lib.radvd.Radvd.is_alive')
140 @patch(SEARCH_FILE)
[all …]
/tools/test/connectivity/acts/framework/tests/
Dacts_android_device_test.py174 @mock.patch.object(
176 @mock.patch.object(
249 @mock.patch(
252 @mock.patch(
267 @mock.patch(
270 @mock.patch(
283 @mock.patch(
286 @mock.patch(
298 @mock.patch(
301 @mock.patch(
[all …]
Dtest_runner_test.py24 from mock import patch
48 @patch('acts.records.TestResult')
49 @patch.object(test_runner.TestRunner, '_write_results_to_file')
62 @patch('acts.records.TestResult')
63 @patch.object(test_runner.TestRunner, '_write_results_to_file')
77 @patch('acts.records.TestResult')
78 @patch.object(test_runner.TestRunner, '_write_results_to_file')
91 @patch('acts.records.TestResult')
92 @patch.object(test_runner.TestRunner, '_write_results_to_file')
106 @patch('acts.records.TestResult')
[all …]
/tools/test/connectivity/acts/framework/tests/metrics/
Dlogger_test.py18 from mock import patch
40 @patch(TEST_CASE_LOGGER_PROXY)
48 @patch(TEST_CLASS_LOGGER_PROXY)
56 @patch(TEST_CASE_LOGGER_PROXY)
66 @patch(TEST_CLASS_LOGGER_PROXY)
76 @patch(COMPILE_IMPORT_PROTO)
77 @patch(GET_FILE)
88 @patch(COMPILE_IMPORT_PROTO)
89 @patch(GET_FILE)
98 @patch(COMPILE_IMPORT_PROTO)
[all …]
/tools/test/connectivity/acts/framework/tests/libs/logging/
Dlog_stream_test.py44 def patch(imported_name, *args, **kwargs): member in LogStreamTest
45 return mock.patch('acts.libs.logging.log_stream.%s' % imported_name,
60 @mock.patch('os.makedirs')
67 with self.patch('MovableFileHandler'):
75 @mock.patch('os.makedirs')
92 @mock.patch('os.makedirs')
128 @mock.patch('os.makedirs')
143 @mock.patch('os.makedirs')
158 @mock.patch('os.makedirs')
180 @mock.patch('os.makedirs')
[all …]
/tools/test/connectivity/acts/framework/tests/controllers/monsoon_lib/api/hvpm/
Dmonsoon_test.py39 self.sleep_patch = mock.patch('time.sleep')
42 self.mp_manager_patch = mock.patch('multiprocessing.Manager')
47 self.monsoon_proxy = mock.patch(
76 @mock.patch(DOWNSAMPLER_IMPORT)
77 @mock.patch(ASSEMBLY_LINE_IMPORT)
91 @mock.patch(DOWNSAMPLER_IMPORT)
92 @mock.patch(ASSEMBLY_LINE_IMPORT)
106 @mock.patch(TEE_IMPORT)
107 @mock.patch(ASSEMBLY_LINE_IMPORT)
120 @mock.patch(TEE_IMPORT)
[all …]
/tools/test/connectivity/acts/framework/tests/libs/ota/ota_tools/
Dupdate_device_ota_tool_test.py29 with mock.patch('acts.controllers.adb.AdbProxy') as adb_proxy, (
30 mock.patch('acts.controllers.fastboot.FastbootProxy')) as fb_proxy:
53 with mock.patch('tempfile.mkdtemp') as mkdtemp, (
54 mock.patch('shutil.rmtree')) as rmtree, (
55 mock.patch('acts.utils.unzip_maintain_permissions')):
63 with mock.patch('acts.libs.proc.job.run'):
71 with mock.patch('tempfile.mkdtemp') as mkdtemp, (
72 mock.patch('shutil.rmtree')) as rmtree, (
73 mock.patch('acts.utils.unzip_maintain_permissions')):
/tools/test/connectivity/acts/framework/tests/test_utils/power/tel/lab/
Dpower_tel_traffic_e2e_test.py34 @mock.patch('json.load')
35 @mock.patch('builtins.open')
36 @mock.patch('os.chmod')
37 @mock.patch('os.system')
38 @mock.patch('time.sleep')
39 @mock.patch(
41 @mock.patch('acts.test_utils.wifi.wifi_test_utils.reset_wifi')
42 @mock.patch('acts.test_utils.wifi.wifi_test_utils.wifi_toggle_state')
43 @mock.patch(
45 @mock.patch(
/tools/tradefederation/core/atest/test_finders/
Dmodule_finder_unittest.py115 @mock.patch.object(module_finder.ModuleFinder, '_get_build_targets',
135 @mock.patch.object(test_finder_utils, 'has_method_in_file',
137 @mock.patch.object(module_finder.ModuleFinder, '_is_vts_module',
139 @mock.patch.object(module_finder.ModuleFinder, '_get_build_targets')
140 @mock.patch('subprocess.check_output', return_value=uc.FIND_ONE)
141 @mock.patch.object(test_finder_utils, 'get_fully_qualified_class_name',
143 @mock.patch('os.path.isfile', side_effect=unittest_utils.isfile_side_effect)
144 @mock.patch('os.path.isdir', return_value=True)
194 @mock.patch.object(test_finder_utils, 'has_method_in_file',
196 @mock.patch.object(module_finder.ModuleFinder, '_is_vts_module',
[all …]
/tools/asuite/atest/test_finders/
Dmodule_finder_unittest.py118 @mock.patch.object(module_finder.ModuleFinder, '_get_build_targets',
138 @mock.patch.object(test_finder_utils, 'has_method_in_file',
140 @mock.patch.object(module_finder.ModuleFinder, '_is_vts_module',
142 @mock.patch.object(module_finder.ModuleFinder, '_get_build_targets')
143 @mock.patch('subprocess.check_output', return_value=uc.FIND_ONE)
144 @mock.patch.object(test_finder_utils, 'get_fully_qualified_class_name',
146 @mock.patch('os.path.isfile', side_effect=unittest_utils.isfile_side_effect)
147 @mock.patch('os.path.isdir', return_value=True)
197 @mock.patch.object(test_finder_utils, 'has_method_in_file',
199 @mock.patch.object(module_finder.ModuleFinder, '_is_vts_module',
[all …]
Dtf_integration_finder_unittest.py63 @mock.patch.object(tf_integration_finder.TFIntegrationFinder,
65 @mock.patch.object(test_finder_utils, 'get_fully_qualified_class_name',
67 @mock.patch('subprocess.check_output')
68 @mock.patch('os.path.exists', return_value=True)
69 @mock.patch('os.path.isfile', return_value=False)
70 @mock.patch('os.path.isdir', return_value=False)
102 @mock.patch.dict('os.environ', {constants.ANDROID_BUILD_TOP:'/'})
103 @mock.patch.object(tf_integration_finder.TFIntegrationFinder,
105 @mock.patch('os.path.realpath',
107 @mock.patch('os.path.isdir', return_value=True)
[all …]
/tools/acloud/create/
Dlocal_image_local_instance_test.py68 @mock.patch("acloud.create.local_image_local_instance.utils")
69 @mock.patch.object(local_image_local_instance.LocalImageLocalInstance,
71 @mock.patch.object(local_image_local_instance.LocalImageLocalInstance,
73 @mock.patch.object(local_image_local_instance.LocalImageLocalInstance,
110 @mock.patch("acloud.create.local_image_local_instance.os.path.isfile")
116 with mock.patch.dict("acloud.internal.lib.ota_tools.os.environ",
125 with mock.patch.dict("acloud.internal.lib.ota_tools.os.environ",
130 with mock.patch.dict("acloud.internal.lib.ota_tools.os.environ",
137 @mock.patch.object(instance, "GetLocalInstanceRuntimeDir")
138 @mock.patch.object(utils, "CheckUserInGroups")
[all …]
Dgoldfish_local_image_local_instance_test.py117 @mock.patch("acloud.create.goldfish_local_image_local_instance.instance."
119 @mock.patch("acloud.create.goldfish_local_image_local_instance.utils")
120 @mock.patch("acloud.create.goldfish_local_image_local_instance."
122 @mock.patch("acloud.create.goldfish_local_image_local_instance."
149 with mock.patch.dict("acloud.create."
167 @mock.patch("acloud.create.goldfish_local_image_local_instance.instance."
169 @mock.patch("acloud.create.goldfish_local_image_local_instance.utils")
170 @mock.patch("acloud.create.goldfish_local_image_local_instance."
172 @mock.patch("acloud.create.goldfish_local_image_local_instance."
191 with mock.patch.dict("acloud.create."
[all …]

123456