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

@@ -21,6 +21,7 @@ import json
from io import BytesIO
from unittest import mock
from zipfile import is_zipfile, ZipFile
from tests.fixtures.birth_names_dashboard import load_birth_names_dashboard_with_slices
import prison
import pytest
@@ -559,6 +560,7 @@ class TestDatabaseApi(SupersetTestCase):
}
self.assertEqual(response, expected_response)
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
def test_get_table_metadata(self):
"""
Database API: Test get table metadata info
@@ -622,6 +624,7 @@ class TestDatabaseApi(SupersetTestCase):
rv = self.client.get(uri)
self.assertEqual(rv.status_code, 404)
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
def test_get_select_star(self):
"""
Database API: Test get select star
@@ -843,7 +846,9 @@ class TestDatabaseApi(SupersetTestCase):
app.config["PREVENT_UNSAFE_DB_CONNECTIONS"] = False
@pytest.mark.usefixtures(
"load_unicode_dashboard_with_position", "load_energy_table_with_slice"
"load_unicode_dashboard_with_position",
"load_energy_table_with_slice",
"load_birth_names_dashboard_with_slices",
)
def test_get_database_related_objects(self):
"""