From 090fbfbead8f9f638cf673102f403eca9f8f1a52 Mon Sep 17 00:00:00 2001 From: gal salomon Date: Tue, 21 Dec 2021 10:02:42 +0200 Subject: [PATCH] fix for assert of error messages Signed-off-by: gal salomon --- s3tests_boto3/functional/test_s3select.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/s3tests_boto3/functional/test_s3select.py b/s3tests_boto3/functional/test_s3select.py index 740cb4d..5ad9271 100644 --- a/s3tests_boto3/functional/test_s3select.py +++ b/s3tests_boto3/functional/test_s3select.py @@ -981,7 +981,7 @@ def test_schema_definition(): # using column-name not exist in schema res_multiple_defintion = remove_xml_tags_from_result( run_s3select(bucket_name,csv_obj_name,"select c1,c10,int(c11) from s3object;",csv_header_info="USE") ).replace("\n","") - assert res_multiple_defintion.find("alias {c11} or column not exist in schema") > 0 + assert re.search(res_multiple_defintion,"alias {c11} or column not exist in schema").span()[1] > 0 find_processing_error = res_multiple_defintion.find("s3select-ProcessingTime-Error") @@ -990,7 +990,7 @@ def test_schema_definition(): # alias-name is identical to column-name res_multiple_defintion = remove_xml_tags_from_result( run_s3select(bucket_name,csv_obj_name,"select int(c1)+int(c2) as c4,c4 from s3object;",csv_header_info="USE") ).replace("\n","") - assert res_multiple_defintion.find("multiple definition of column {c4} as schema-column and alias") > 0 + assert re.search(res_multiple_defintion,"multiple definition of column {c4} as schema-column and alias").span()[1] > 0 @attr('s3select') def test_when_then_else_expressions():