villebro commented on a change in pull request #17702: URL: https://github.com/apache/superset/pull/17702#discussion_r765870994
########## File path: tests/integration_tests/charts/data/api_tests.py ########## @@ -425,6 +425,30 @@ def test_with_invalid_where_parameter__400(self): assert rv.status_code == 400 + @pytest.mark.usefixtures("load_birth_names_dashboard_with_slices") + def test_with_invalid_where_parameter_closing_unclosed__400(self): + self.query_context_payload["queries"][0]["filters"] = [] + # WHERE-clause closing unclosed parens + self.query_context_payload["queries"][0]["extras"][ + "where" + ] = "state = 'CA') OR (state = 'NY'" + + rv = self.post_assert_metric(CHART_DATA_URI, self.query_context_payload, "data") + + assert rv.status_code == 400 + + @pytest.mark.usefixtures("load_birth_names_dashboard_with_slices") + def test_with_invalid_having_parameter_closing_and_comment__400(self): + self.query_context_payload["queries"][0]["filters"] = [] + # WHERE-clause with unclosed parens Review comment: Good catch - I removed both comments, as they were really not needed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org