Home
last modified time | relevance | path

Searched refs:expect_call (Results 1 – 25 of 37) sorted by relevance

12

/external/autotest/client/bin/net/
Dnet_utils_unittest.py41 utils.system.expect_call('service network restart', ignore_status=False)
47 utils.system.expect_call('service network start', ignore_status=False)
54 utils.system.expect_call('service network stop', ignore_status=False)
62 utils.system.expect_call(msg, ignore_status=False)
64 utils.system.expect_call(msg, ignore_status=False)
72 utils.system.expect_call(msg, ignore_status=False)
74 utils.system.expect_call(msg, ignore_status=False)
86 socket.socket.expect_call(socket.PF_PACKET,
90 s.settimeout.expect_call(net_utils.TIMEOUT)
91 s.bind.expect_call(('eth0', net_utils.raw_socket.ETH_P_ALL))
[all …]
/external/autotest/server/
Dautotest_unittest.py70 utils.get_server_dir.expect_call().and_return(self.serverdir)
91 location = os.path.abspath.expect_call(location).and_return(location)
94 utils.get.expect_call(os.path.join(self.serverdir,
97 self.host.wait_up.expect_call(timeout=30)
98 self.host.setup.expect_call()
99 self.host.get_autodir.expect_call().and_return("autodir")
100 self.host.set_autodir.expect_call("autodir")
101 self.host.run.expect_call('mkdir -p autodir')
102 self.host.run.expect_call('rm -rf autodir/results/*',
116 self.host.run.expect_call('rm -f "autodir/packages.checksum"')
[all …]
Dsubcommand_unittest.py62 subcommand.os.path.abspath.expect_call('dir').and_return('/foo/dir')
63 subcommand.os.path.exists.expect_call('/foo/dir').and_return(False)
64 subcommand.os.mkdir.expect_call('/foo/dir')
66 (subcommand.os.path.exists.expect_call('/foo/dir/debug')
68 subcommand.os.mkdir.expect_call('/foo/dir/debug')
79 subcommand.os.fork.expect_call().and_return(1000)
114 subcommand.os.pipe.expect_call().and_return((10, 20))
115 subcommand.os.fork.expect_call().and_return(0)
116 subcommand.os.close.expect_call(10)
117 fork_hook.expect_call(cmd)
[all …]
/external/autotest/client/bin/
Dpackage_unittest.py25 os.path.isfile.expect_call(input_package).and_return(True)
26 utils.system_output.expect_call(
28 utils.system_output.expect_call(
44 os_dep.command.expect_call('rpm')
49 utils.system_output.expect_call(v_cmd).and_return(ver)
53 utils.system_output.expect_call(s_cmd).and_return('source')
55 utils.system_output.expect_call(v_cmd).and_return(ver)
57 utils.system_output.expect_call(a_cmd).and_return('586')
59 utils.system.expect_call(i_cmd)
81 os_dep.command.expect_call('dpkg')
[all …]
Djob_unittest.py187 job.base_client_job._cleanup_debugdir_files.expect_call()
188 job.base_client_job._cleanup_results_dir.expect_call()
190 self.job._load_state.expect_call()
194 harness.select.expect_call(None,
212 utils.drop_caches.expect_call()
215 os.path.exists.expect_call(download).and_return(False)
216 os.mkdir.expect_call(download)
217 shutil.copyfile.expect_call(mock.is_string_comparator(),
221 job_sysinfo.log_per_reboot_data.expect_call()
223 self.job.record.expect_call('START', None, None)
[all …]
Dsetup_job_unittest.py160 job.base_client_job._cleanup_debugdir_files.expect_call()
161 job.base_client_job._cleanup_results_dir.expect_call()
211 os.path.exists.expect_call(tmp_dir).and_return(True)
212 os.path.isdir.expect_call(tmp_dir).and_return(False)
229 os.path.exists.expect_call(tmp_dir).and_return(False)
230 os.mkdir.expect_call(tmp_dir)
231 os.path.isdir.expect_call(tmp_dir).and_return(True)
232 os.path.exists.expect_call(results_dir1).and_return(True)
233 os.path.exists.expect_call(results_dir2).and_return(True)
234 os.path.exists.expect_call(results_dir3).and_return(False)
[all …]
Dpartition_unittest.py78 os.popen.expect_call(SAMPLE_FDISK).and_return(
107 partition.partition.expect_call(job, '/dev/hdc3').and_return('3')
113 partition.partition.expect_call(job, '/dev/hdc2').and_return('2')
114 partition.partition.expect_call(job, '/dev/hdc3').and_return('3')
121 partition.partition.expect_call(job, '/dev/hdc3').and_return('3')
/external/autotest/client/common_lib/
Dtest_unittest.py68 self.test.drop_caches_between_iterations.expect_call()
69 before_hook.expect_call(self.test)
70 self.test.run_once.expect_call(1, 2, arg='val')
71 self.test.postprocess_iteration.expect_call()
72 self.test.analyze_perf_constraints.expect_call([])
73 after_hook.expect_call(self.test)
89 self.test.drop_caches_between_iterations.expect_call()
90 before_hook.expect_call(self.test)
91 self.test.run_once.expect_call(1, 2, arg='val').and_raises(error)
92 after_hook.expect_call(self.test)
[all …]
Dutils_unittest.py73 utils.open.expect_call("filename", "r").and_return(test_file)
125 utils.open.expect_call("filename", "w").and_return(test_file)
164 utils.open.expect_call("filename", "w").and_return(test_file)
184 os.path.exists.expect_call(filename).and_return(True)
185 utils.open.expect_call(filename).and_return(test_file)
189 os.path.isdir.expect_call("file").and_return(False)
197 os.path.isdir.expect_call("file").and_return(False)
198 os.path.exists.expect_call("file").and_return(False)
204 os.path.isdir.expect_call("file").and_return(False)
211 os.path.isdir.expect_call("dir").and_return(True)
[all …]
/external/autotest/client/common_lib/test_utils/
Dmock_demo.py84 m2.method1.expect_call().and_return(1)
85 m2.method3.expect_call(10).and_return(10)
86 f.expect_call("how many").and_return(42)
87 m1.method2.expect_call(5).and_return(0)
88 m2.method1.expect_call().and_return(2)
89 m2.method4.expect_call(1, 4).and_return(6)
90 m2.method2.expect_call(3).and_return(6)
91 m2.method2.expect_call(mock.is_string_comparator()).and_return("foo")
110 c.method1.expect_call()
111 c.method2.expect_call(4).and_return(4)
[all …]
/external/autotest/tko/
Dutils_unittest.py56 os.path.exists.expect_call(
63 os.path.exists.expect_call(
65 os.path.exists.expect_call(
72 os.path.exists.expect_call(
74 os.path.exists.expect_call(
76 os.path.exists.expect_call(
83 os.path.exists.expect_call(
85 os.path.exists.expect_call(
87 os.path.exists.expect_call("/.autoserv_execute").and_return(True)
93 os.path.exists.expect_call(
[all …]
/external/autotest/database/
Ddatabase_connection_unittest.py66 self._fake_backend.connect.expect_call(**_CONNECT_KWARGS)
77 self._fake_backend.connect.expect_call(**_CONNECT_KWARGS)
86 self._fake_backend.disconnect.expect_call()
87 call = self._fake_backend.connect.expect_call(**_CONNECT_KWARGS)
93 self._fake_backend.connect.expect_call(**_CONNECT_KWARGS).and_raises(
96 time.sleep.expect_call(_RECONNECT_DELAY)
110 self._fake_backend.disconnect.expect_call()
117 self._fake_backend.disconnect.expect_call()
142 self._fake_backend.connect.expect_call(**_CONNECT_KWARGS)
150 self._fake_backend.disconnect.expect_call()
[all …]
Ddb_utils_unittest.py47 self.manager.execute.expect_call('DROP VIEW `%s`' % view)
62 self.manager.execute.expect_call(
70 self.manager.get_db_name.expect_call().and_return(self.DB_NAME)
71 self.manager.execute.expect_call(
/external/autotest/scheduler/
Ddrones_unittest.py31 drones.drone_utility.create_host.expect_call('fakehost').and_return(
33 self._mock_host.is_up.expect_call().and_return(False)
41 drones.drone_utility.create_host.expect_call('fakehost').and_return(
43 self._mock_host.is_up.expect_call().and_return(True)
46 self._mock_host.run.expect_call(
59 drones.drone_utility.create_host.expect_call('fakehost').and_return(
61 self._mock_host.is_up.expect_call().and_return(True)
68 self._mock_host.run.expect_call(
Ddrone_utility_unittest.py36 self._mock_get_process_info.expect_call().and_return([])
68 self._mock_get_process_info.expect_call().and_return([])
99 self._mock_get_process_info.expect_call().and_return(all_processes)
124 self._mock_get_process_info.expect_call().and_return(all_processes)
125 self._mock_process_has_dark_mark.expect_call(3).and_return(True)
126 self._mock_process_has_dark_mark.expect_call(369).and_return(False)
146 self._mock_get_process_info.expect_call().and_return([])
Dagent_task_unittest.py41 system_utils.get_drones.expect_call().and_return(self._drones)
43 models.DroneSet.drone_sets_enabled.expect_call().and_return(False)
58 system_utils.get_drones.expect_call().and_return(self._drones)
60 models.DroneSet.drone_sets_enabled.expect_call().and_return(False)
Dthread_lib_unittest.py33 drones.drone_utility.create_host.expect_call(hostname).and_return(
35 self._mock_host.is_up.expect_call().and_return(True)
65 self._mock_host.run.expect_call(
156 task_queue.wait_on_drones.expect_call()
167 task_queue.wait_on_drones.expect_call()
201 self._mock_host.run.expect_call(
219 self._mock_host.run.expect_call(
Ddrone_task_queue_unittest.py32 drones.drone_utility.create_host.expect_call(hostname).and_return(
34 self._mock_host.is_up.expect_call().and_return(True)
77 self._mock_host.run.expect_call(
92 self._mock_host.run.expect_call(
Dmonitor_db_unittest.py524 .expect_call(self.execution_tag,
546 self.mock_drone_manager.get_pidfile_contents.expect_call(
612 self.mock_drone_manager.get_pidfile_contents.expect_call(
621 self.mock_drone_manager.is_process_running.expect_call(
710 task.poll.expect_call()
711 task.is_done.expect_call().and_return(False)
712 task.abort.expect_call()
724 task.abort.expect_call()
727 task.poll.expect_call()
728 task.is_done.expect_call().and_return(True)
[all …]
/external/autotest/server/hosts/
Dbase_classes_unittest.py31 utils.get_server_dir.expect_call().and_return("/unittest/server")
45 installableObj.install.expect_call(host)
52 global_config.global_config.get_config_value.expect_call(
61 global_config.global_config.get_config_value.expect_call(
70 global_config.global_config.get_config_value.expect_call(
80 global_config.global_config.get_config_value.expect_call(
91 global_config.global_config.get_config_value.expect_call(
/external/autotest/server/cros/network/rf_switch/
Dscpi_unittest.py35 socket.socket.expect_call().and_return(sock)
38 sock.connect.expect_call((self._HOST, self._PORT))
61 self.mock_scpi.socket.send.expect_call('%s' % test_command)
91 self.mock_scpi.socket.send.expect_call('%s' % test_command)
110 self.mock_scpi.socket.send.expect_call('%s\n' %
136 self.mock_scpi.socket.send.expect_call('%s\n' % scpi.Scpi.CMD_IDENTITY)
149 self.mock_scpi.socket.send.expect_call('%s\n' % scpi.Scpi.CMD_RESET)
163 self.mock_scpi.socket.send.expect_call('%s\n' %
Drf_switch_unittest.py36 self.mock_rf_switch.socket.send.expect_call('%s' % cmd)
37 self.mock_rf_switch.socket.send.expect_call(
39 self.mock_rf_switch.socket.send.expect_call(
53 self.mock_rf_switch.socket.send.expect_call('%s' % cmd)
196 self.mock_rf_switch.socket.send.expect_call(
/external/autotest/client/tests/wb_kupdate/
Dwb_kupdate_unittest.py53 self._wbkupdate_obj._get_disk_usage.expect_call('').and_return(10)
55 self._wbkupdate_obj._get_disk_usage.expect_call('').and_return(10)
57 self._wbkupdate_obj._get_disk_usage.expect_call('').and_return(11)
80 self._wbkupdate_obj._get_disk_usage.expect_call('').and_return(10)
82 self._wbkupdate_obj._get_disk_usage.expect_call('').and_return(10)
/external/autotest/tko/parsers/
Dversion_0_unittest.py37 (models.test.parse_host_keyval.expect_call('.', hostname)
42 models.job.read_keyval.expect_call('.').and_return(
56 models.job.read_keyval.expect_call('.').and_return(raw_keyval)
61 version_0.job.find_hostname.expect_call('.').and_raises(
75 version_0.job.find_hostname.expect_call('.').and_return('foo')
86 version_0.job.find_hostname.expect_call('.').and_raises(
100 models.job.read_keyval.expect_call('.').and_return(raw_keyval)
113 models.job.read_keyval.expect_call('.').and_return(raw_keyval)
127 models.job.read_keyval.expect_call('.').and_return(raw_keyval)
/external/autotest/cli/
Dacl_unittest.py43 sys.exit.expect_call(1).and_raises(cli_mock.ExitException)
152 sys.exit.expect_call(1).and_raises(cli_mock.ExitException)
163 sys.exit.expect_call(1).and_raises(cli_mock.ExitException)
173 sys.exit.expect_call(1).and_raises(cli_mock.ExitException)
273 sys.exit.expect_call(1).and_raises(cli_mock.ExitException)

12