summaryrefslogtreecommitdiff
path: root/test/python/docker/test_system.py
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-11-11 16:47:05 -0700
committerJhon Honce <jhonce@redhat.com>2020-11-12 15:13:09 -0700
commita1187ee6f3a85f8d4e68717731b7b9e2163e8f25 (patch)
tree76617b969d1f8c2069c0492f1d7c4ea117cfc9ce /test/python/docker/test_system.py
parenta65ecc70c21eb5eef7d7a6b70cc1f90e577bb72e (diff)
downloadpodman-a1187ee6f3a85f8d4e68717731b7b9e2163e8f25.tar.gz
podman-a1187ee6f3a85f8d4e68717731b7b9e2163e8f25.tar.bz2
podman-a1187ee6f3a85f8d4e68717731b7b9e2163e8f25.zip
Refactor to use DockerClient vs APIClient
* Update tests and framework * remove tests for APIClient methods Signed-off-by: Jhon Honce <jhonce@redhat.com>
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"])