mirror of
https://github.com/apache/superset.git
synced 2026-04-26 03:24:53 +00:00
[fix] use filter_scopes in dashboard warmup strategy (#9235)
* [fix] use filter_scopes in dashboard warmup strategy * remove unnecessary comment
This commit is contained in:
@@ -58,7 +58,11 @@ class CacheWarmUpTests(SupersetTestCase):
|
||||
dashboard = MagicMock()
|
||||
dashboard.json_metadata = json.dumps(
|
||||
{
|
||||
"filter_immune_slices": [chart_id],
|
||||
"filter_scopes": {
|
||||
str(filter_box_id): {
|
||||
"name": {"scope": ["ROOT_ID"], "immune": [chart_id]}
|
||||
}
|
||||
},
|
||||
"default_filters": json.dumps(
|
||||
{str(filter_box_id): {"name": ["Alice", "Bob"]}}
|
||||
),
|
||||
@@ -90,7 +94,11 @@ class CacheWarmUpTests(SupersetTestCase):
|
||||
}
|
||||
}
|
||||
),
|
||||
"filter_immune_slice_fields": {chart_id: ["__time_range"]},
|
||||
"filter_scopes": {
|
||||
str(filter_box_id): {
|
||||
"__time_range": {"scope": ["ROOT_ID"], "immune": [chart_id]}
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
result = get_form_data(chart_id, dashboard)
|
||||
@@ -109,7 +117,11 @@ class CacheWarmUpTests(SupersetTestCase):
|
||||
"default_filters": json.dumps(
|
||||
{str(filter_box_id): {"__time_range": "100 years ago : today"}}
|
||||
),
|
||||
"filter_immune_slice_fields": {chart_id: ["__time_range"]},
|
||||
"filter_scopes": {
|
||||
str(filter_box_id): {
|
||||
"__time_range": {"scope": ["ROOT_ID"], "immune": [chart_id]}
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
result = get_form_data(chart_id, dashboard)
|
||||
|
||||
Reference in New Issue
Block a user