Home
last modified time | relevance | path

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

/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.py69 subcommand.os.path.abspath.expect_call('dir').and_return('/foo/dir')
70 subcommand.os.path.exists.expect_call('/foo/dir').and_return(False)
71 subcommand.os.mkdir.expect_call('/foo/dir')
73 (subcommand.os.path.exists.expect_call('/foo/dir/debug')
75 subcommand.os.mkdir.expect_call('/foo/dir/debug')
86 subcommand.os.fork.expect_call().and_return(1000)
121 subcommand.os.pipe.expect_call().and_return((10, 20))
122 subcommand.os.fork.expect_call().and_return(0)
123 subcommand.os.close.expect_call(10)
124 fork_hook.expect_call(cmd)
[all …]
Dfrontend_unittest.py41 rpc_client_lib.add_protocol.expect_call('test-host').and_return(
43 rpc_client_lib.get_proxy.expect_call(
/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.py189 job.base_client_job._cleanup_debugdir_files.expect_call()
190 job.base_client_job._cleanup_results_dir.expect_call()
192 self.job._load_state.expect_call()
196 harness.select.expect_call(None,
214 utils.drop_caches.expect_call()
217 os.path.exists.expect_call(download).and_return(False)
218 os.mkdir.expect_call(download)
219 shutil.copyfile.expect_call(mock.is_string_comparator(),
223 job_sysinfo.log_per_reboot_data.expect_call()
225 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.py83 os.popen.expect_call(SAMPLE_FDISK).and_return(
112 partition.partition.expect_call(job, '/dev/hdc3').and_return('3')
118 partition.partition.expect_call(job, '/dev/hdc2').and_return('2')
119 partition.partition.expect_call(job, '/dev/hdc3').and_return('3')
126 partition.partition.expect_call(job, '/dev/hdc3').and_return('3')
Dfsinfo_unittest.py25 fsinfo.open.expect_call(filename, 'r').and_return(test_file)
/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 …]
Dmock.py214 def expect_call(self, *args, **dargs): member in mock_function
/external/autotest/client/common_lib/
Dtest_unittest.py83 self.test.drop_caches_between_iterations.expect_call()
84 before_hook.expect_call(self.test)
85 self.test.run_once.expect_call(1, 2, arg='val')
86 self.test.postprocess_iteration.expect_call()
87 self.test.analyze_perf_constraints.expect_call([])
88 after_hook.expect_call(self.test)
104 self.test.drop_caches_between_iterations.expect_call()
105 before_hook.expect_call(self.test)
106 self.test.run_once.expect_call(1, 2, arg='val').and_raises(error)
107 after_hook.expect_call(self.test)
[all …]
Dutils_unittest.py78 utils.open.expect_call("filename", "r").and_return(test_file)
130 utils.open.expect_call("filename", "w").and_return(test_file)
169 utils.open.expect_call("filename", "w").and_return(test_file)
189 os.path.exists.expect_call(filename).and_return(True)
190 utils.open.expect_call(filename).and_return(test_file)
194 os.path.isdir.expect_call("file").and_return(False)
202 os.path.isdir.expect_call("file").and_return(False)
203 os.path.exists.expect_call("file").and_return(False)
209 os.path.isdir.expect_call("file").and_return(False)
216 os.path.isdir.expect_call("dir").and_return(True)
[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/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/client/common_lib/hosts/
Dbase_classes_unittest.py33 host.run.expect_call(
41 host.run.expect_call(command).and_return(fake_cmd_status)
/external/autotest/frontend/afe/
Drpc_interface_unittest.py1154 mock_afe2.run.expect_call('modify_host_local', id=host.id,
1164 mock_afe2.run.expect_call('modify_host', id=host.id,
1223 mock_afe2.run.expect_call(
1232 mock_afe1.run.expect_call(
1266 mock_afe1.run.expect_call('delete_host', id=host1.id)
1307 mock_afe1.run.expect_call('modify_label', id=label1.id, invalid=1)
1330 mock_afe1.run.expect_call('delete_label', id=label1.id)