mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
test: birth names (#12226)
* add birth names fixture * fix birth names related tests * fix test_import_v0_dataset_cli_export columns order * fix celery tests drop table * fix mysql datetime type * fix mysql typo in charts/api_tests * refactor * add licence * fix use fixture for presto * fix presto, hive query * fix flaky metadata * fix mysql bigint type * fix run query * fix hive datatype in metadata * fix slice owner for cypress * refactor num_boys num_girls * fix is_dttm column * debug logging * fix query offset * fix presto ds type in metadata * fix presto ds type * clean up debug logging
This commit is contained in:
@@ -32,6 +32,7 @@ from superset.tasks.async_queries import (
|
||||
load_explore_json_into_cache,
|
||||
)
|
||||
from tests.base_tests import SupersetTestCase
|
||||
from tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices
|
||||
from tests.fixtures.query_context import get_query_context
|
||||
from tests.test_app import app
|
||||
|
||||
@@ -42,6 +43,7 @@ def get_table_by_name(name: str) -> SqlaTable:
|
||||
|
||||
|
||||
class TestAsyncQueries(SupersetTestCase):
|
||||
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
|
||||
@mock.patch.object(async_query_manager, "update_job")
|
||||
def test_load_chart_data_into_cache(self, mock_update_job):
|
||||
async_query_manager.init_app(app)
|
||||
@@ -79,6 +81,7 @@ class TestAsyncQueries(SupersetTestCase):
|
||||
errors = [{"message": "Error: foo"}]
|
||||
mock_update_job.assert_called_with(job_metadata, "error", errors=errors)
|
||||
|
||||
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
|
||||
@mock.patch.object(async_query_manager, "update_job")
|
||||
def test_load_explore_json_into_cache(self, mock_update_job):
|
||||
async_query_manager.init_app(app)
|
||||
|
||||
Reference in New Issue
Block a user