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 Ville Brofeldt
parent 8b09414806
commit 0acd2ccaaa
26 changed files with 695 additions and 207 deletions

View File

@@ -40,6 +40,7 @@ from superset.utils.core import backend, get_example_database, get_main_database
from superset.utils.dict_import_export import export_to_dict
from tests.base_tests import SupersetTestCase
from tests.conftest import CTAS_SCHEMA_NAME
from tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices
from tests.fixtures.energy_dashboard import load_energy_table_with_slice
from tests.fixtures.importexport import (
database_config,
@@ -272,13 +273,12 @@ class TestDatasetApi(SupersetTestCase):
)
)
schema_values = [
"",
"admin_database",
"information_schema",
"public",
]
expected_response = {
"count": 4,
"count": 3,
"result": [{"text": val, "value": val} for val in schema_values],
}
self.login(username="admin")
@@ -301,15 +301,10 @@ class TestDatasetApi(SupersetTestCase):
)
query_parameter = {"page": 0, "page_size": 1}
pg_test_query_parameter(
query_parameter, {"count": 4, "result": [{"text": "", "value": ""}]},
)
query_parameter = {"page": 1, "page_size": 1}
pg_test_query_parameter(
query_parameter,
{
"count": 4,
"count": 3,
"result": [{"text": "admin_database", "value": "admin_database"}],
},
)
@@ -1182,6 +1177,7 @@ class TestDatasetApi(SupersetTestCase):
# gamma users by default do not have access to this dataset
assert rv.status_code == 404
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
def test_get_dataset_related_objects(self):
"""
Dataset API: Test get chart and dashboard count related to a dataset