Fix BaseBaremetalTest._assertExpected docstring
This updates the docstring for tempest plugin's
BaseBaremetalTest._assertExpected() so that it clarifies
what it is doing and what the parameters are.
Change-Id: Icd61bbbdc0f0633a93adef89652d54a87d835534
diff --git a/ironic_tempest_plugin/tests/api/admin/base.py b/ironic_tempest_plugin/tests/api/admin/base.py
index 0e3f59e..cd15936 100644
--- a/ironic_tempest_plugin/tests/api/admin/base.py
+++ b/ironic_tempest_plugin/tests/api/admin/base.py
@@ -119,7 +119,22 @@
super(BaseBaremetalTest, cls).resource_cleanup()
def _assertExpected(self, expected, actual):
- """Check if not expected keys/values exist in actual response body."""
+ """Check if expected keys/values exist in actual response body.
+
+ Check if the expected keys and values are in the actual response body.
+ It will not check the keys 'created_at' and 'updated_at', since they
+ will always have different values. Asserts if any expected key (or
+ corresponding value) is not in the actual response.
+
+ Note: this method has an underscore even though it is used outside of
+ this class, in order to distinguish this method from the more standard
+ assertXYZ methods.
+
+ :param expected: dict of key-value pairs that are expected to be in
+ 'actual' dict.
+ :param actual: dict of key-value pairs.
+
+ """
for key, value in expected.items():
if key not in ('created_at', 'updated_at'):
self.assertIn(key, actual)