def test_parse_request_object_should_raise_request_validation_exception(self):
        """Ensures parse_request_object raises RequestValidationError on pydantic v1 validation error"""

        class PydanticV1Model(pydantic.v1.BaseModel):
            field2: str

        request_obj_dict = {"field1": "hello"}

        with self.assertRaises(RequestValidationError) as context:
            api.parse_request_object(PydanticV1Model, request_obj_dict)

        self.assertIn('field required', str(context.exception.errors()))
Ensures parse_request_object raises RequestValidationError on pydantic v1 validation error
tests/integ_tests/tensor_search/test_api.py