Skip to content

Commit d9eb61e

Browse files
committed
Fix tests with asyncio_patch
1 parent 1fd8444 commit d9eb61e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/compute/docker/test_docker.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ async def test_install_busybox():
221221

222222
with patch("os.path.isfile", return_value=False):
223223
with patch("shutil.which", return_value="/usr/bin/busybox"):
224-
with patch("asyncio.create_subprocess_exec", return_value=mock_process) as create_subprocess_mock:
224+
with asyncio_patch("asyncio.create_subprocess_exec", return_value=mock_process) as create_subprocess_mock:
225225
with patch("shutil.copy2") as copy2_mock:
226226
await Docker.install_busybox()
227227
create_subprocess_mock.assert_called_with(
@@ -242,7 +242,7 @@ async def test_install_busybox_dynamic_linked():
242242

243243
with patch("os.path.isfile", return_value=False):
244244
with patch("shutil.which", return_value="/usr/bin/busybox"):
245-
with patch("asyncio.create_subprocess_exec", return_value=mock_process):
245+
with asyncio_patch("asyncio.create_subprocess_exec", return_value=mock_process):
246246
with pytest.raises(DockerError) as e:
247247
await Docker.install_busybox()
248248
assert str(e.value) == "No busybox executable could be found"

0 commit comments

Comments
 (0)