mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
refactor: Break up superset/views/core.py (#10078)
* Remove unreferenced function from views/core.py * Remove excess constants from views/core.py * Extract CssTemplate-related views to their own file from core.py * Remove duplicate constant declaration and make the constant less racist * Move free-floating functions in views/core.py to views/utils.py * Move AccessRequestsModelView out of views/core.py into its own module * Move health checks and KV ModelView out of core.py and into their own modules * Move R model view to its own module * Move after-request header setting to views/base.py from views/core.py * black * mypy * isort * Fix reference to imported app * pylint * Fix some imports * Add some missing view imports * Fix a missing import
This commit is contained in:
@@ -37,6 +37,7 @@ from unittest import mock, skipUnless
|
||||
import pandas as pd
|
||||
import sqlalchemy as sqla
|
||||
|
||||
import superset.views.utils
|
||||
from tests.test_app import app
|
||||
from superset import (
|
||||
dataframe,
|
||||
@@ -1106,7 +1107,7 @@ class CoreTests(SupersetTestCase):
|
||||
self.assertIsInstance(serialized_payload, str)
|
||||
|
||||
query_mock = mock.Mock()
|
||||
deserialized_payload = views._deserialize_results_payload(
|
||||
deserialized_payload = superset.views.utils._deserialize_results_payload(
|
||||
serialized_payload, query_mock, use_new_deserialization
|
||||
)
|
||||
|
||||
@@ -1159,7 +1160,7 @@ class CoreTests(SupersetTestCase):
|
||||
query_mock = mock.Mock()
|
||||
query_mock.database.db_engine_spec.expand_data = expand_data
|
||||
|
||||
deserialized_payload = views._deserialize_results_payload(
|
||||
deserialized_payload = superset.views.utils._deserialize_results_payload(
|
||||
serialized_payload, query_mock, use_new_deserialization
|
||||
)
|
||||
df = results.to_pandas_df()
|
||||
|
||||
Reference in New Issue
Block a user