mirror of
https://github.com/apache/superset.git
synced 2026-04-20 16:44:46 +00:00
refactor: Removes the Filter Box code (#26328)
Co-authored-by: John Bodley <john.bodley@gmail.com>
This commit is contained in:
committed by
GitHub
parent
591f266543
commit
d9a3c3e1dd
@@ -759,7 +759,7 @@ class TestUtils(SupersetTestCase):
|
||||
|
||||
def test_merge_extra_filters_with_unset_legacy_time_range(self):
|
||||
"""
|
||||
Make sure native filter is applied if filter box time range is unset.
|
||||
Make sure native filter is applied if filter time range is unset.
|
||||
"""
|
||||
form_data = {
|
||||
"time_range": "Last 10 days",
|
||||
@@ -778,28 +778,6 @@ class TestUtils(SupersetTestCase):
|
||||
},
|
||||
)
|
||||
|
||||
def test_merge_extra_filters_with_conflicting_time_ranges(self):
|
||||
"""
|
||||
Make sure filter box takes precedence if both native filter and filter box
|
||||
time ranges are set.
|
||||
"""
|
||||
form_data = {
|
||||
"time_range": "Last 10 days",
|
||||
"extra_filters": [{"col": "__time_range", "op": "==", "val": "Last week"}],
|
||||
"extra_form_data": {
|
||||
"time_range": "Last year",
|
||||
},
|
||||
}
|
||||
merge_extra_filters(form_data)
|
||||
self.assertEqual(
|
||||
form_data,
|
||||
{
|
||||
"time_range": "Last week",
|
||||
"applied_time_extras": {"__time_range": "Last week"},
|
||||
"adhoc_filters": [],
|
||||
},
|
||||
)
|
||||
|
||||
def test_merge_extra_filters_with_extras(self):
|
||||
form_data = {
|
||||
"time_range": "Last 10 days",
|
||||
|
||||
Reference in New Issue
Block a user