Home
last modified time | relevance | path

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

/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 …]
Dmock.py177 def and_return(self, return_obj): member in function_mapping
/external/autotest/server/
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)
67 .and_return(False))
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)
118 func.expect_call(1, 2).and_return(True)
120 subcommand.cPickle.HIGHEST_PROTOCOL).and_return('True')
138 subcommand.os.pipe.expect_call().and_return((10, 20))
139 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)
95 '../client')).and_return('source_material')
99 self.host.get_autodir.expect_call().and_return("autodir")
120 type=bool).and_return(False)
136 'fetch_location', type=list, default=[]).and_return([])
138 os.path.exists.expect_call('/etc/cros_chroot_version').and_return(True)
141 type=bool).and_return(True)
156 'fetch_location', type=list, default=[]).and_return(['repo'])
157 os.path.exists.expect_call('/etc/cros_chroot_version').and_return(True)
[all …]
Dfrontend_unittest.py41 rpc_client_lib.add_protocol.expect_call('test-host').and_return(
/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 …]
Djob_unittest.py196 None).and_return(my_harness)
215 os.path.exists.expect_call(download).and_return(False)
322 harness_args).and_return(None)
337 os.path.exists.expect_call(tmp_dir).and_return(True)
338 os.path.isdir.expect_call(tmp_dir).and_return(False)
355 os.path.exists.expect_call(tmp_dir).and_return(False)
357 os.path.isdir.expect_call(tmp_dir).and_return(True)
358 os.path.exists.expect_call(results_dir1).and_return(True)
359 os.path.exists.expect_call(results_dir2).and_return(True)
360 os.path.exists.expect_call(results_dir3).and_return(False)
[all …]
Dsetup_job_unittest.py211 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)
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)
235 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')
Dfsinfo_unittest.py21 fsinfo.open.expect_call(filename, 'r').and_return(test_file)
/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/grpc-grpc/src/ruby/spec/generic/
Drpc_desc_spec.rb41 expect(@call).to receive(:read_unary_request).once.and_return(Object.new)
48 expect(@call).to receive(:read_unary_request).once.and_return(Object.new)
56 expect(@call).to receive(:read_unary_request).once.and_return(Object.new)
77 allow(@call).to receive(:single_req_view).and_return(@call)
78 allow(@call).to receive(:output_metadata).and_return(@call)
85 expect(@call).to receive(:read_unary_request).once.and_return(req)
86 expect(@call).to receive(:output_metadata).once.and_return(fake_md)
97 allow(@call).to receive(:multi_req_view).and_return(@call)
121 allow(@call).to receive(:output_metadata).and_return({})
129 expect(@call).to receive(:output_metadata).and_return(
[all …]
/external/autotest/server/hosts/
Dbase_classes_unittest.py31 utils.get_server_dir.expect_call().and_return("/unittest/server")
53 "HOSTS", "wait_up_processes", default="").and_return("")
62 "HOSTS", "wait_up_processes", default="").and_return(" ")
71 "HOSTS", "wait_up_processes", default="").and_return("proc1")
81 "HOSTS", "wait_up_processes", default="").and_return(
92 "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/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/
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/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(
/external/autotest/client/common_lib/hosts/
Dbase_classes_unittest.py35 ignore_status=True).and_return(
41 host.run.expect_call(command).and_return(fake_cmd_status)
/external/autotest/cli/
Dcli_mock.py142 comm.expect_call(op, **dargs).and_return(expected)
Dtopic_common_unittest.py760 self.atest.parser.error.expect_call('no such option: --unknown').and_return(None)
Djob_unittest.py111 getpass.getuser.expect_call().and_return('user0')
/external/autotest/server/cros/network/rf_switch/
Dscpi_unittest.py35 socket.socket.expect_call().and_return(sock)