diff options
Diffstat (limited to 'test/varlink/test_system.py')
-rw-r--r-- | test/varlink/test_system.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/test/varlink/test_system.py b/test/varlink/test_system.py index 6180d2068..00848de2b 100644 --- a/test/varlink/test_system.py +++ b/test/varlink/test_system.py @@ -1,21 +1,19 @@ import unittest -from varlink import (Client, VarlinkError) +from podman_testcase import PodmanTestCase -address = "unix:/run/podman/io.projectatomic.podman" -client = Client(address=address) -class SystemAPI(unittest.TestCase): +class TestSystemAPI(PodmanTestCase): def test_ping(self): - podman = client.open("io.projectatomic.podman") - response = podman.Ping() - self.assertEqual("OK", response["ping"]["message"]) + response = self.podman.Ping() + self.assertEqual('OK', response['ping']['message']) def test_GetVersion(self): - podman = client.open("io.projectatomic.podman") - response = podman.GetVersion() - for k in ["version", "go_version", "built", "os_arch"]: - self.assertTrue(k in response["version"].keys()) + response = self.podman.GetVersion() + self.assertTrue(set( + ['version', 'go_version', 'built', 'os_arch'] + ).issubset(response['version'].keys())) + if __name__ == '__main__': unittest.main() |