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:
Karol Kostrzewa
2021-01-11 14:57:55 +01:00
committed by GitHub
parent ff7b789931
commit 2ab490a101
26 changed files with 695 additions and 207 deletions

View File

@@ -17,9 +17,12 @@
"""Unit tests for Superset with caching"""
import json
import pytest
from superset import app, db
from superset.extensions import cache_manager
from superset.utils.core import QueryStatus
from tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices
from .base_tests import SupersetTestCase
@@ -34,6 +37,7 @@ class TestCache(SupersetTestCase):
cache_manager.cache.clear()
cache_manager.data_cache.clear()
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
def test_no_data_cache(self):
data_cache_config = app.config["DATA_CACHE_CONFIG"]
app.config["DATA_CACHE_CONFIG"] = {"CACHE_TYPE": "null"}
@@ -54,6 +58,7 @@ class TestCache(SupersetTestCase):
self.assertFalse(resp["is_cached"])
self.assertFalse(resp_from_cache["is_cached"])
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
def test_slice_data_cache(self):
# Override cache config
data_cache_config = app.config["DATA_CACHE_CONFIG"]