Skip to content

Commit 602564d

Browse files
cephadm: import types from the modules that defines them
For the test fixtures created for Podman and Docker, import the Podman and Docker types from the module that defines them, rather than the cephadm.py file which now imports them. Signed-off-by: John Mulligan <[email protected]>
1 parent 72ea37a commit 602564d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/cephadm/tests/fixtures.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@ def import_cephadm():
1717

1818

1919
def mock_docker():
20-
_cephadm = import_cephadm()
21-
docker = mock.Mock(_cephadm.Docker)
20+
from cephadmlib.container_engines import Docker
21+
22+
docker = mock.Mock(Docker)
2223
docker.path = '/usr/bin/docker'
2324
return docker
2425

2526

2627
def mock_podman():
27-
_cephadm = import_cephadm()
28-
podman = mock.Mock(_cephadm.Podman)
28+
from cephadmlib.container_engines import Podman
29+
30+
podman = mock.Mock(Podman)
2931
podman.path = '/usr/bin/podman'
3032
podman.version = (2, 1, 0)
3133
return podman

0 commit comments

Comments
 (0)