mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
Allow trailing spaces in simple filter values (#7617)
This commit is contained in:
parent
15d0361148
commit
722043c672
@ -240,6 +240,13 @@ class DruidFuncTestCase(unittest.TestCase):
|
|||||||
res = DruidDatasource.get_filters([filtr], [], column_dict)
|
res = DruidDatasource.get_filters([filtr], [], column_dict)
|
||||||
self.assertEqual('a', res.filter['filter']['value'])
|
self.assertEqual('a', res.filter['filter']['value'])
|
||||||
|
|
||||||
|
def test_get_filters_keeps_trailing_spaces(self):
|
||||||
|
filtr = {'col': 'A', 'op': 'in', 'val': ['a ']}
|
||||||
|
col = DruidColumn(column_name='A')
|
||||||
|
column_dict = {'A': col}
|
||||||
|
res = DruidDatasource.get_filters([filtr], [], column_dict)
|
||||||
|
self.assertEqual('a ', res.filter['filter']['value'])
|
||||||
|
|
||||||
def test_get_filters_converts_strings_to_num(self):
|
def test_get_filters_converts_strings_to_num(self):
|
||||||
filtr = {'col': 'A', 'op': 'in', 'val': ['6']}
|
filtr = {'col': 'A', 'op': 'in', 'val': ['6']}
|
||||||
col = DruidColumn(column_name='A')
|
col = DruidColumn(column_name='A')
|
||||||
|
Loading…
Reference in New Issue
Block a user