You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by yo...@apache.org on 2022/01/28 07:04:02 UTC

[superset] 03/10: add test

This is an automated email from the ASF dual-hosted git repository.

yongjiezhao pushed a commit to branch pull/17881
in repository https://gitbox.apache.org/repos/asf/superset.git

commit fa1ce26f246a4c3cc9c689e946edcf2c6f89734d
Author: stephenLYZ <75...@qq.com>
AuthorDate: Sun Jan 2 11:09:36 2022 +0800

    add test
---
 tests/integration_tests/druid_func_tests.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/integration_tests/druid_func_tests.py b/tests/integration_tests/druid_func_tests.py
index af31081..6bf4992 100644
--- a/tests/integration_tests/druid_func_tests.py
+++ b/tests/integration_tests/druid_func_tests.py
@@ -364,6 +364,16 @@ class TestDruidFunc(SupersetTestCase):
     @unittest.skipUnless(
         SupersetTestCase.is_module_installed("pydruid"), "pydruid not installed"
     )
+    def test_get_filters_keeps_values_if_not_between_in_quotes(self):
+        filtr = {"col": "A", "op": "in", "val": ['"a"b']}
+        col = DruidColumn(column_name="A")
+        column_dict = {"A": col}
+        res = DruidDatasource.get_filters([filtr], [], column_dict)
+        self.assertEqual("'a'b", res.filter["filter"]["value"])
+
+    @unittest.skipUnless(
+        SupersetTestCase.is_module_installed("pydruid"), "pydruid not installed"
+    )
     def test_get_filters_keeps_trailing_spaces(self):
         filtr = {"col": "A", "op": "in", "val": ["a "]}
         col = DruidColumn(column_name="A")