mirror of
https://github.com/apache/superset.git
synced 2026-05-07 08:54:23 +00:00
chore: Remove legacy SIP-15 interim logic/flags (#18936)
* chore: Remove legacy SIP-15 logic * Update ab9a9d86e695_deprecate_time_range_endpoints.py * Update UPDATING.md * Update UPDATING.md * Update UPDATING.md Co-authored-by: John Bodley <john.bodley@airbnb.com>
This commit is contained in:
@@ -30,7 +30,7 @@ from superset.common.query_object import QueryObject
|
||||
from superset.connectors.connector_registry import ConnectorRegistry
|
||||
from superset.connectors.sqla.models import SqlMetric
|
||||
from superset.extensions import cache_manager
|
||||
from superset.utils.core import AdhocMetricExpressionType, backend, TimeRangeEndpoint
|
||||
from superset.utils.core import AdhocMetricExpressionType, backend
|
||||
from tests.integration_tests.base_tests import SupersetTestCase
|
||||
from tests.integration_tests.fixtures.birth_names_dashboard import (
|
||||
load_birth_names_dashboard_with_slices,
|
||||
@@ -235,23 +235,6 @@ class TestQueryContext(SupersetTestCase):
|
||||
cache_key = query_context.query_cache_key(query_object)
|
||||
self.assertNotEqual(cache_key_original, cache_key)
|
||||
|
||||
def test_query_context_time_range_endpoints(self):
|
||||
"""
|
||||
Ensure that time_range_endpoints are populated automatically when missing
|
||||
from the payload.
|
||||
"""
|
||||
self.login(username="admin")
|
||||
payload = get_query_context("birth_names")
|
||||
del payload["queries"][0]["extras"]["time_range_endpoints"]
|
||||
query_context = ChartDataQueryContextSchema().load(payload)
|
||||
query_object = query_context.queries[0]
|
||||
extras = query_object.to_dict()["extras"]
|
||||
assert "time_range_endpoints" in extras
|
||||
self.assertEqual(
|
||||
extras["time_range_endpoints"],
|
||||
(TimeRangeEndpoint.INCLUSIVE, TimeRangeEndpoint.EXCLUSIVE),
|
||||
)
|
||||
|
||||
def test_handle_metrics_field(self):
|
||||
"""
|
||||
Should support both predefined and adhoc metrics.
|
||||
|
||||
Reference in New Issue
Block a user