move image agnostic util to shared runtime util (#2859)

This commit is contained in:
Xingyao Wang
2024-07-09 06:17:01 +08:00
committed by GitHub
parent e2636f9ece
commit f2e92b2db7
3 changed files with 7 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
from unittest.mock import MagicMock, patch
from opendevin.runtime.docker.image_agnostic_util import (
from opendevin.runtime.utils.image_agnostic import (
_get_new_image_name,
generate_dockerfile_content,
get_od_sandbox_image,
@@ -31,8 +31,8 @@ def test_get_new_image_name():
assert new_image_name == 'od_sandbox:ubuntu__latest'
@patch('opendevin.runtime.docker.image_agnostic_util._build_sandbox_image')
@patch('opendevin.runtime.docker.image_agnostic_util.docker.DockerClient')
@patch('opendevin.runtime.utils.image_agnostic._build_sandbox_image')
@patch('opendevin.runtime.utils.image_agnostic.docker.DockerClient')
def test_get_od_sandbox_image(mock_docker_client, mock_build_sandbox_image):
base_image = 'debian:11'
mock_docker_client.images.list.return_value = [