Home
last modified time | relevance | path

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

12

/external/autotest/client/bin/net/
Dnet_utils_unittest.py87 socket.SOCK_RAW).and_return(s)
116 utils.system.expect_call(cmd, ignore_status=True).and_return(0)
127 utils.system.expect_call(cmd, ignore_status=True).and_return(1)
131 utils.system.expect_call(cmd, ignore_status=True).and_return(0)
145 utils.system.expect_call(cmd, ignore_status=True).and_return(0)
192 utils.system_output.expect_call(cmd).and_return('\n field: match')
198 utils.system_output.expect_call(cmd).and_return(None)
202 utils.system_output.expect_call(cmd).and_return(' field: match')
214 os.listdir.expect_call(stat_path).and_return(())
219 os.listdir.expect_call(stat_path).and_return(('some_stat',))
[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")
111 c.method2.expect_call(4).and_return(4)
112 c.method3.expect_call(4).and_return(5)
[all …]
/external/autotest/server/
Dsubcommand_unittest.py63 subcommand.os.path.abspath.expect_call('dir').and_return('/foo/dir')
64 subcommand.os.path.exists.expect_call('/foo/dir').and_return(False)
68 .and_return(False))
80 subcommand.os.fork.expect_call().and_return(1000)
115 subcommand.os.pipe.expect_call().and_return((10, 20))
116 subcommand.os.fork.expect_call().and_return(0)
119 func.expect_call(1, 2).and_return(True)
121 subcommand.cPickle.HIGHEST_PROTOCOL).and_return('True')
139 subcommand.os.pipe.expect_call().and_return((10, 20))
140 subcommand.os.fork.expect_call().and_return(0)
[all …]
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 os.getcwd.expect_call().and_return('cwd')
99 '../client')).and_return('source_material')
103 self.host.get_autodir.expect_call().and_return("autodir")
124 type=bool).and_return(False)
138 'fetch_location', type=list, default=[]).and_return([])
142 type=bool).and_return(True)
155 'fetch_location', type=list, default=[]).and_return(['repo'])
183 os.path.abspath.expect_call('.').and_return('.')
[all …]
Drpm_kernel_unittest.py34 host.get_tmp_dir.expect_call().and_return(remote_tmpdir)
39 utils.run.expect_call('/usr/bin/rpm -q -p %s' % rpm).and_return(result)
40 self.kernel.get_image_name.expect_call().and_return("vmlinuz")
44 self.kernel.get_vmlinux_name.expect_call().and_return("/boot/vmlinux")
66 utils.run.expect_call(cmd).and_return(result)
79 ).and_return(result)
92 ).and_return(result)
104 % "source.rpm", ignore_status=True).and_return(result)
Ddeb_kernel_unittest.py30 self.host.get_tmp_dir.expect_call().and_return(self.remote_tmpdir)
45 utils.sh_escape(self.kernel.source_material)).and_return(result)
47 utils.sh_escape(self.kernel.source_material)).and_return(result)
51 utils.sh_escape(self.kernel.source_material)).and_return(result)
53 utils.sh_escape(self.kernel.source_material)).and_return(result)
Dsource_kernel_unittest.py35 self.host.get_tmp_dir.expect_call().and_return("tmpdir")
53 self.host.get_tmp_dir.expect_call().and_return("tmpdir")
/external/autotest/client/bin/
Dpackage_unittest.py25 os.path.isfile.expect_call(input_package).and_return(True)
27 'file ' + input_package).and_return(result)
29 'file ' + input_package).and_return(result)
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')
84 utils.system_output.expect_call(v_cmd).and_return(ver)
87 utils.system_output.expect_call(v_cmd).and_return(ver)
89 utils.system_output.expect_call(a_cmd).and_return('586')
[all …]
Dkernel_unittest.py74 time.time.expect_call().and_return(when)
81 'boot.default_args').and_return(base_args)
168 os.path.isdir.expect_call(self.src_dir).and_return(True)
170 os.path.isdir.expect_call(self.build_dir).and_return(True)
172 os.path.exists.expect_call(self.src_dir).and_return(False)
175 os.path.exists.expect_call(path).and_return(True)
181 kernel.open.expect_call(logpath, 'w+').and_return(self.logfile)
182 utils.get_current_kernel_arch.expect_call().and_return('ia64')
210 self.job.config_get.expect_call('mirror.mirrors').and_return('mirror')
212 'mirror').and_return('patches')
[all …]
Djob_unittest.py187 None).and_return(my_harness)
206 os.path.exists.expect_call(download).and_return(False)
213 'boottool.executable').and_return(None)
224 utils.read_one_line.expect_call('/proc/cmdline').and_return(
334 harness_args).and_return(None)
364 self.config.get.expect_call(name).and_return(val)
379 os.path.exists.expect_call(tmp_dir).and_return(True)
380 os.path.isdir.expect_call(tmp_dir).and_return(False)
397 os.path.exists.expect_call(tmp_dir).and_return(False)
399 os.path.isdir.expect_call(tmp_dir).and_return(True)
[all …]
Dsetup_job_unittest.py215 os.path.exists.expect_call(tmp_dir).and_return(True)
216 os.path.isdir.expect_call(tmp_dir).and_return(False)
233 os.path.exists.expect_call(tmp_dir).and_return(False)
235 os.path.isdir.expect_call(tmp_dir).and_return(True)
236 os.path.exists.expect_call(results_dir1).and_return(True)
237 os.path.exists.expect_call(results_dir2).and_return(True)
238 os.path.exists.expect_call(results_dir3).and_return(False)
239 os.path.exists.expect_call(results_dir3).and_return(False)
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/tko/
Dutils_unittest.py57 jobdir + "/.autoserv_execute").and_return(True)
64 jobdir + "/sub/.autoserv_execute").and_return(False)
66 jobdir + "/.autoserv_execute").and_return(True)
73 jobdir + "/sub/sub/.autoserv_execute").and_return(False)
75 jobdir + "/sub/.autoserv_execute").and_return(False)
77 jobdir + "/.autoserv_execute").and_return(True)
84 jobdir + "/.autoserv_execute").and_return(False)
86 "/results/.autoserv_execute").and_return(False)
87 os.path.exists.expect_call("/.autoserv_execute").and_return(True)
94 jobdir + "/.autoserv_execute").and_return(False)
[all …]
/external/autotest/scheduler/
Ddrones_unittest.py30 drones.drone_utility.create_host.expect_call('fakehost').and_return(
32 self._mock_host.is_up.expect_call().and_return(False)
40 drones.drone_utility.create_host.expect_call('fakehost').and_return(
42 self._mock_host.is_up.expect_call().and_return(True)
48 connect_timeout=mock.is_instance_comparator(int)).and_return(
58 drones.drone_utility.create_host.expect_call('fakehost').and_return(
60 self._mock_host.is_up.expect_call().and_return(True)
70 connect_timeout=mock.is_instance_comparator(int)).and_return(
Dagent_task_unittest.py40 system_utils.get_drones.expect_call().and_return(self._drones)
42 models.DroneSet.drone_sets_enabled.expect_call().and_return(False)
57 system_utils.get_drones.expect_call().and_return(self._drones)
59 models.DroneSet.drone_sets_enabled.expect_call().and_return(False)
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)
81 ).and_return(mock_result)
95 connect_timeout=mock.is_instance_comparator(int)).and_return(
Ddrone_utility_unittest.py37 self.drone_utility._get_process_info.expect_call().and_return(
56 self.drone_utility._get_process_info.expect_call().and_return(
67 self.drone_utility._get_process_info.expect_call().and_return(
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)
68 connect_timeout=mock.is_instance_comparator(int)).and_return(
205 ).and_return(mock_result)
222 connect_timeout=mock.is_instance_comparator(int)).and_return(
Dmonitor_db_unittest.py460 gc.collect.expect_call().and_return(0)
573 .and_return(self.pidfile_id))
594 self.pidfile_id, use_second_read=use_second_read).and_return(
660 self.pidfile_id, use_second_read=False).and_return(
669 self.process).and_return(is_running)
758 task.is_done.expect_call().and_return(False)
775 task.is_done.expect_call().and_return(True)
877 job._pending_count.expect_call().and_return(0)
886 job._pending_count.expect_call().and_return(4)
891 job._pending_count.expect_call().and_return(4)
[all …]
/external/autotest/server/hosts/
Dbase_classes_unittest.py40 utils.get_server_dir.expect_call().and_return("/unittest/server")
63 "HOSTS", "wait_up_processes", default="").and_return("")
72 "HOSTS", "wait_up_processes", default="").and_return(" ")
81 "HOSTS", "wait_up_processes", default="").and_return("proc1")
91 "HOSTS", "wait_up_processes", default="").and_return(
102 "HOSTS", "wait_up_processes", default="").and_return(
/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/client/common_lib/
Dbase_utils_unittest.py63 base_utils.open.expect_call("filename", "r").and_return(test_file)
115 base_utils.open.expect_call("filename", "w").and_return(test_file)
154 base_utils.open.expect_call("filename", "w").and_return(test_file)
174 os.path.exists.expect_call(filename).and_return(True)
175 base_utils.open.expect_call(filename).and_return(test_file)
179 os.path.isdir.expect_call("file").and_return(False)
187 os.path.isdir.expect_call("file").and_return(False)
188 os.path.exists.expect_call("file").and_return(False)
194 os.path.isdir.expect_call("file").and_return(False)
201 os.path.isdir.expect_call("dir").and_return(True)
[all …]
/external/autotest/tko/parsers/
Dversion_0_unittest.py38 .and_return(return_dict))
42 models.job.read_keyval.expect_call('.').and_return(
56 models.job.read_keyval.expect_call('.').and_return(raw_keyval)
75 version_0.job.find_hostname.expect_call('.').and_return('foo')
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/client/common_lib/hosts/
Dbase_classes_unittest.py32 host.run.expect_call('df -PB 1000000 /foo | tail -1').and_return(
36 host.run.expect_call('df -PB 1000000 /foo | tail -1').and_return(
/external/autotest/database/
Ddb_utils_unittest.py70 self.manager.get_db_name.expect_call().and_return(self.DB_NAME)
72 self.EXISTS_QUERY_BASE % table, self.DB_NAME).and_return(

12