summaryrefslogtreecommitdiff
path: root/test/python/docker/test_system.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/python/docker/test_system.py')
-rw-r--r--test/python/docker/test_system.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/python/docker/test_system.py b/test/python/docker/test_system.py
index f911baee4..46b90e5f6 100644
--- a/test/python/docker/test_system.py
+++ b/test/python/docker/test_system.py
@@ -3,7 +3,7 @@ import sys
import time
import unittest
-from docker import APIClient
+from docker import DockerClient
from test.python.docker import Podman, common, constant
@@ -15,7 +15,7 @@ class TestSystem(unittest.TestCase):
def setUp(self):
super().setUp()
- self.client = APIClient(base_url="tcp://127.0.0.1:8080", timeout=15)
+ self.client = DockerClient(base_url="tcp://127.0.0.1:8080", timeout=15)
TestSystem.podman.restore_image_from_cache(self.client)
TestSystem.topContainerId = common.run_top_container(self.client)
@@ -58,9 +58,10 @@ class TestSystem(unittest.TestCase):
def test_info_container_details(self):
info = self.client.info()
self.assertEqual(info["Containers"], 1)
- self.client.create_container(image=constant.ALPINE)
+ self.client.containers.create(image=constant.ALPINE)
info = self.client.info()
self.assertEqual(info["Containers"], 2)
def test_version(self):
- self.assertIsNotNone(self.client.version())
+ version = self.client.version()
+ self.assertIsNotNone(version["Platform"]["Name"])