blob: 6180d206836e7c57588382e4e69f08b26ca3c61a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import unittest
from varlink import (Client, VarlinkError)
address = "unix:/run/podman/io.projectatomic.podman"
client = Client(address=address)
class SystemAPI(unittest.TestCase):
def test_ping(self):
podman = client.open("io.projectatomic.podman")
response = 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())
if __name__ == '__main__':
unittest.main()
|