summaryrefslogtreecommitdiff
path: root/test/apiv2
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-09-13 14:29:22 -0700
committerJhon Honce <jhonce@redhat.com>2021-09-14 07:47:24 -0700
commitd7256be807890892c988cc7d270e3d1bf951397c (patch)
tree53fadc1842f3de6a7c62ab97c8e16f15b0dc4484 /test/apiv2
parentb603c7a4b91d30b33ce987740156f46804f24074 (diff)
downloadpodman-d7256be807890892c988cc7d270e3d1bf951397c.tar.gz
podman-d7256be807890892c988cc7d270e3d1bf951397c.tar.bz2
podman-d7256be807890892c988cc7d270e3d1bf951397c.zip
Enhance bindings for IDE hints
* Follow https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source for leading comment * Add godoc strings for all exposed methods for IDE support * Copy field godoc strings into generated code as function godoc string * Remove unused/unnecessary fields from generator.go structures * Cleanup code regarding template usage Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'test/apiv2')
-rw-r--r--test/apiv2/python/rest_api/test_v2_0_0_system.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/apiv2/python/rest_api/test_v2_0_0_system.py b/test/apiv2/python/rest_api/test_v2_0_0_system.py
index 8171abb84..1140d09cf 100644
--- a/test/apiv2/python/rest_api/test_v2_0_0_system.py
+++ b/test/apiv2/python/rest_api/test_v2_0_0_system.py
@@ -30,13 +30,12 @@ class SystemTestCase(APITestCase):
# Actor.ID is uppercase for compatibility
self.assertIn("ID", obj["Actor"])
# Verify 1.22+ deprecated variants are present if current originals are
- if (obj["Actor"]["ID"]):
- self.assertEqual(obj["Actor"]["ID"], obj["id"])
- if (obj["Action"]):
- self.assertEqual(obj["Action"], obj["status"])
- if (obj["Actor"].get("Attributes") and obj["Actor"]["Attributes"].get("image")):
- self.assertEqual(obj["Actor"]["Attributes"]["image"], obj["from"])
-
+ if obj["Actor"]["ID"]:
+ self.assertEqual(obj["Actor"]["ID"], obj["id"])
+ if obj["Action"]:
+ self.assertEqual(obj["Action"], obj["status"])
+ if obj["Actor"].get("Attributes") and obj["Actor"]["Attributes"].get("image"):
+ self.assertEqual(obj["Actor"]["Attributes"]["image"], obj["from"])
def test_ping(self):
required_headers = (