Home
last modified time | relevance | path

Searched refs:Patch (Results 1 – 25 of 32) sorted by relevance

12

/tools/acloud/create/
Dremote_image_local_instance_test.py39 self.Patch(
43 self.Patch(auth, "CreateCredentials", return_value=mock.MagicMock())
54 self.Patch(setup_common, "PackageInstalled", return_value=False)
60 self.Patch(setup_common, "PackageInstalled", return_value=True)
61 self.Patch(remote_image_local_instance,
63 self.Patch(os.path, "exists", return_value=True)
74 self.Patch(os.path, "exists", return_value=False)
75 self.Patch(os, "makedirs")
94 self.Patch(os.path, "exists", return_value=True)
95 self.Patch(os, "makedirs")
[all …]
Dcreate_test.py61 self.Patch(utils, "InteractWithQuestion", return_value="Y")
62 self.Patch(utils, "FindExecutable", return_value=None)
65 self.Patch(os.environ, "get", return_value=None)
71 self.Patch(subprocess, "check_call", return_value=True)
72 self.Patch(os.environ, "get", return_value="/fake_dir2")
77 self.Patch(utils, "InteractWithQuestion", return_value="N")
87 self.Patch(gcp_setup_runner.GcpTaskRunner,
90 self.Patch(host_setup_runner.HostBasePkgInstaller,
93 self.Patch(config, "AcloudConfigManager")
94 self.Patch(config.AcloudConfigManager, "Load")
[all …]
Davd_spec_test.py45 self.Patch(list_instances, "ChooseOneRemoteInstance", return_value=mock.MagicMock())
46 self.Patch(list_instances, "GetInstancesFromInstanceNames", return_value=mock.MagicMock())
52 self.Patch(glob, "glob", return_value=["fake.img"])
57 self.Patch(os.path, "isfile", return_value=True)
66 self.Patch(utils, "GetBuildEnvironmentVariable",
68 self.Patch(os.path, "isfile", return_value=False)
77 self.Patch(utils, "GetBuildEnvironmentVariable",
84 self.Patch(utils, "GetBuildEnvironmentVariable",
86 self.Patch(os.path, "isdir", return_value=True)
94 self.Patch(utils, "GetBuildEnvironmentVariable",
[all …]
Dcreate_common_test.py77 self.Patch(os.environ, "get", return_value="/fake_dir2")
78 self.Patch(utils, "GetDistDir", return_value="/fake_dir1")
80 self.Patch(os.path, "exists",
89 self.Patch(os.environ, "get", return_value="/fake_dir2")
90 self.Patch(utils, "GetDistDir", return_value=None)
101 self.Patch(
105 self.Patch(auth, "CreateCredentials", return_value=mock.MagicMock())
Dlocal_image_local_instance_test.py81 self.Patch(instance, "GetLocalInstanceName",
88 self.Patch(instance, "LocalInstance",
90 self.Patch(list_instance, "GetActiveCVD",
216 self.Patch(subprocess, "Popen", return_value=process)
217 self.Patch(instance, "GetLocalInstanceHomeDir",
219 self.Patch(os, "makedirs")
220 self.Patch(shutil, "rmtree")
Dcheeps_remote_image_remote_instance_test.py33 self.Patch(
38 self.Patch(
42 self.Patch(
46 self.Patch(auth, "CreateCredentials", return_value=mock.MagicMock())
50 self.Patch(uuid, "uuid4", return_value=fake_uuid)
/tools/acloud/internal/lib/
Dadb_tools_test.py40 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
44 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
48 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
55 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
68 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
78 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
88 self.Patch(subprocess, "check_output", return_value=self.DEVICE_NONE)
96 self.Patch(subprocess, "check_output", return_value=self.DEVICE_ALIVE)
97 self.Patch(subprocess, "check_call", return_value=True)
103 self.Patch(subprocess, "check_output", return_value=self.DEVICE_OFFLINE)
[all …]
Dutils_test.py67 self.Patch(os, "chmod")
68 self.Patch(tempfile, "mkdtemp", return_value="/tmp/tempdir")
69 self.Patch(shutil, "rmtree")
78 self.Patch(os, "chmod")
79 self.Patch(tempfile, "mkdtemp", return_value="/tmp/tempdir")
80 self.Patch(shutil, "rmtree")
96 self.Patch(os, "chmod")
97 self.Patch(tempfile, "mkdtemp", return_value="/tmp/tempdir")
100 self.Patch(shutil, "rmtree", side_effect=expected_error)
115 self.Patch(os, "chmod")
[all …]
Dandroid_compute_client_test.py76 self.Patch(android_compute_client.AndroidComputeClient,
84 self.Patch(gcompute_client.ComputeClient, "CreateImage")
85 self.Patch(
100 self.Patch(
104 self.Patch(gcompute_client.ComputeClient, "CreateInstance")
105 self.Patch(
145 self.Patch(
156 self.Patch(
170 self.Patch(
175 self.Patch(
[all …]
Dcvd_compute_client_multi_stage_test.py86 self.Patch(cvd_compute_client_multi_stage.CvdComputeClient, "InitResourceHandle")
87 self.Patch(android_build_client.AndroidBuildClient, "InitResourceHandle")
88 self.Patch(android_build_client.AndroidBuildClient, "DownloadArtifact")
89 self.Patch(list_instances, "GetInstancesFromInstanceNames", return_value=mock.MagicMock())
90 self.Patch(list_instances, "ChooseOneRemoteInstance", return_value=mock.MagicMock())
91 self.Patch(Ssh, "ScpPushFile")
92 self.Patch(Ssh, "WaitForSsh")
93 self.Patch(Ssh, "GetBaseCmd")
164 self.Patch(subprocess, "Popen", return_value=created_subprocess)
165 self.Patch(subprocess, "check_call")
[all …]
Dgstorage_client_test.py28 self.Patch(gstorage_client.StorageClient, "InitResourceHandle")
47 self.Patch(
71 self.Patch(io, "FileIO", return_value=mock_file_io)
72 self.Patch(
94 self.Patch(io, "FileIO", side_effect=OSError("fake OSError"))
134 self.Patch(
141 self.Patch(
145 self.Patch(time, "sleep")
Dssh_test.py51 self.Patch(subprocess, "Popen",
82 self.Patch(subprocess, "Popen", return_value=self.created_subprocess)
95 self.Patch(subprocess, "Popen", return_value=self.created_subprocess)
113 self.Patch(subprocess, "Popen", return_value=self.created_subprocess)
126 self.Patch(subprocess, "Popen", return_value=self.created_subprocess)
144 self.Patch(subprocess, "Popen", return_value=self.created_subprocess)
157 self.Patch(subprocess, "Popen", return_value=self.created_subprocess)
204 self.Patch(ssh, "_SshCall", return_value=-1)
Dgoldfish_compute_client_test.py75 self.Patch(goldfish_compute_client.GoldfishComputeClient,
80 self.Patch(
84 self.Patch(
88 self.Patch(gcompute_client.ComputeClient, "CreateInstance")
89 self.Patch(
Dbase_cloud_client_test.py41 self.Patch(base_cloud_client, "build")
56 self.Patch(
89 self.Patch(
96 self.Patch(time, "sleep")
141 self.Patch(time, "sleep")
Dgcompute_client_test.py77 self.Patch(gcompute_client.ComputeClient, "InitResourceHandle")
215 mock_check = self.Patch(gcompute_client.ComputeClient,
218 mock_wait = self.Patch(gcompute_client.ComputeClient, "WaitOnOperation")
240 mock_check = self.Patch(gcompute_client.ComputeClient,
243 mock_wait = self.Patch(gcompute_client.ComputeClient, "WaitOnOperation")
266 mock_check = self.Patch(gcompute_client.ComputeClient,
269 mock_wait = self.Patch(gcompute_client.ComputeClient, "WaitOnOperation")
313 self.Patch(gcompute_client.ComputeClient, "CheckImageExists", return_value=False)
322 self.Patch(gcompute_client.ComputeClient, "CheckImageExists", return_value=False)
408 self.Patch(apiclient.http, "BatchHttpRequest", return_value=mock_batch)
[all …]
Dcheeps_compute_client_test.py68 self.Patch(cheeps_compute_client.CheepsComputeClient,
73 self.Patch(
75 self.Patch(
79 self.Patch(gcompute_client.ComputeClient, "CreateInstance")
/tools/acloud/setup/
Dhost_setup_runner_test.py48 self.Patch(utils, "CheckUserInGroups", return_value=True)
49 self.Patch(CuttlefishHostSetup, "_CheckLoadedModules", return_value=True)
55 self.Patch(
57 self.Patch(CuttlefishHostSetup, "_CheckLoadedModules", return_value=True)
61 self.Patch(utils, "CheckUserInGroups", return_value=True)
62 self.Patch(
69 self.Patch(
91 self.Patch(platform, "system", return_value="Mac")
106 self.Patch(platform, "system", return_value="Linux")
107 self.Patch(setup_common, "PackageInstalled", return_value=False)
[all …]
Dsetup_common_test.py44 self.Patch(
54 self.Patch(
66 self.Patch(
76 self.Patch(
/tools/acloud/list/
Dlist_test.py48 self.Patch(list_instance, "GetInstances", return_value=instance_alive)
74 self.Patch(list_instance, "GetCFRemoteInstances", return_value=instance_names)
79 self.Patch(list_instance, "GetCFRemoteInstances", return_value=[])
86 self.Patch(list_instance, "GetCFRemoteInstances", return_value=instance_names)
87 self.Patch(utils, "GetAnswerFromList", return_value=choose_instance)
110 self.Patch(instance, "GetAllLocalInstanceConfigs",
112 self.Patch(instance, "GetLocalInstanceRuntimeDir")
116 self.Patch(instance, "LocalInstance", return_value=local_ins)
123 self.Patch(instance, "LocalInstance", return_value=local_ins)
131 self.Patch(instance.Instance, "Summary")
[all …]
Dinstance_test.py64 self.Patch(subprocess, "check_output", return_value=self.PS_LAUNCH_CVD)
75 self.Patch(cvd_runtime_config, "CvdRuntimeConfig",
171 self.Patch(instance, "datetime")
187 self.Patch(subprocess, "check_output", return_value=self.PS_SSH_TUNNEL)
188 self.Patch(instance, "_GetElapsedTime", return_value="fake_time")
189 self.Patch(instance.RemoteInstance, "_GetZoneName", return_value="fake_zone")
211 self.Patch(
215 self.Patch(instance, "_GetElapsedTime", return_value="fake_time")
216 self.Patch(AdbTools, "IsAdbConnected", return_value=True)
232 self.Patch(AdbTools, "IsAdbConnected", return_value=False)
[all …]
/tools/acloud/public/actions/
Dremote_instance_cf_device_factory_test.py44 self.Patch(auth, "CreateCredentials", return_value=mock.MagicMock())
45 self.Patch(android_build_client.AndroidBuildClient, "InitResourceHandle")
46 self.Patch(cvd_compute_client_multi_stage.CvdComputeClient, "InitResourceHandle")
47 self.Patch(list_instances, "GetInstancesFromInstanceNames", return_value=mock.MagicMock())
48 self.Patch(list_instances, "ChooseOneRemoteInstance", return_value=mock.MagicMock())
49 self.Patch(utils, "GetBuildEnvironmentVariable",
51 self.Patch(glob, "glob", return_vale=["fake.img"])
88 self.Patch(cvd_compute_client_multi_stage.CvdComputeClient, "UpdateFetchCvd")
110 self.Patch(uuid, "uuid4", return_value=fake_uuid)
111 self.Patch(cvd_compute_client_multi_stage.CvdComputeClient, "CreateInstance")
[all …]
Dcommon_operations_test.py49 self.Patch(
54 self.Patch(
58 self.Patch(auth, "CreateCredentials", return_value=mock.MagicMock())
59 self.Patch(self.compute_client, "GetInstanceIP", return_value=self.IP)
60 self.Patch(
62 self.Patch(
66 self.Patch(self.device_factory, "GetBuildInfoDict",
71 self.Patch(self.device_factory, "GetBuildInfoDict",
Dcreate_cuttlefish_action_test.py60 self.Patch(
65 self.Patch(
69 self.Patch(
73 self.Patch(
77 self.Patch(auth, "CreateCredentials", return_value=mock.MagicMock())
103 self.Patch(uuid, "uuid4", return_value=fake_uuid)
/tools/acloud/reconnect/
Dreconnect_test.py47 self.Patch(subprocess, "check_call", return_value=True)
48 self.Patch(utils, "LaunchVncClient")
49 self.Patch(utils, "AutoConnect")
50 self.Patch(AdbTools, "IsAdbConnected", return_value=False)
51 self.Patch(AdbTools, "IsAdbConnectionAlive", return_value=False)
52 self.Patch(utils, "IsCommandRunning", return_value=False)
74 self.Patch(utils, "AutoConnect",
122 self.Patch(utils, "AutoConnect")
123 self.Patch(reconnect, "StartVnc")
172 self.Patch(subprocess, "check_call", return_value=True)
[all …]
/tools/acloud/public/
Ddevice_driver_test.py61 self.Patch(android_build_client, "AndroidBuildClient",
64 self.Patch(
67 self.Patch(
71 self.Patch(auth, "CreateCredentials", return_value=mock.MagicMock())
88 self.Patch(uuid, "uuid4", return_value=fake_uuid)

12