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:
John Bodley
2022-03-04 09:15:36 +13:00
committed by GitHub
parent 6becd38e7f
commit 26486d01c1
111 changed files with 123 additions and 744 deletions

View File

@@ -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.