From 9741317f32f2680dbb7e06bb5f9112ccc0c0df82 Mon Sep 17 00:00:00 2001 From: Sai Medhini Reddy Maryada <117196660+saimedhi@users.noreply.github.com> Date: Thu, 14 Mar 2024 10:38:58 -0700 Subject: [PATCH] Update test_rest_api_spec.py --- test_opensearchpy/test_server/test_rest_api_spec.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test_opensearchpy/test_server/test_rest_api_spec.py b/test_opensearchpy/test_server/test_rest_api_spec.py index 50a00d78..da1f1b8f 100644 --- a/test_opensearchpy/test_server/test_rest_api_spec.py +++ b/test_opensearchpy/test_server/test_rest_api_spec.py @@ -258,6 +258,7 @@ def run_do(self, action: Any) -> Any: with warnings.catch_warnings(record=True) as caught_warnings: try: self.last_response = api(**args) + print("self.last_response", self.last_response) except Exception as e: if not catch: raise @@ -374,18 +375,25 @@ def run_match(self, action: Any) -> None: for path, expected in action.items(): value = self._lookup(path) expected = self._resolve(expected) - + print("expected before", expected ) + print("value before ", value) if ( isinstance(expected, str) and expected.startswith("/") and expected.endswith("/") ): expected = re.compile(expected[1:-1], re.VERBOSE | re.MULTILINE) + print("entered 1st condition") + print("expected", expected ) + print("value", value) assert expected.search(value), "%r does not match %r" % ( value, expected, ) else: + print("entered 2nd condition") + print("expected", expected ) + print("value", value) self._assert_match_equals(value, expected) def run_contains(self, action: Any) -> None: