fix: tests on database, dataset, saved_queries apis (#28397)

This commit is contained in:
Daniel Vaz Gaspar 2024-05-09 13:43:31 +01:00 committed by GitHub
parent e1a440fa36
commit 9c065951e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 15 additions and 1 deletions

View File

@ -138,5 +138,5 @@ fi
if [ $RUN_TESTS -eq 1 ]
then
pytest --durations=0 --maxfail=1 "${TEST_MODULE}"
pytest -vv --durations=0 "${TEST_MODULE}"
fi

View File

@ -194,6 +194,7 @@ class TestDatabaseApi(SupersetTestCase):
"allow_cvas",
"allow_dml",
"allow_file_upload",
"allow_multi_catalog",
"allow_run_async",
"allows_cost_estimate",
"allows_subquery",
@ -3256,6 +3257,7 @@ class TestDatabaseApi(SupersetTestCase):
"sqlalchemy_uri_placeholder": "postgresql://user:password@host:port/dbname[?key=value&key=value...]",
"engine_information": {
"supports_file_upload": True,
"supports_dynamic_catalog": True,
"disable_ssh_tunneling": False,
},
},
@ -3279,6 +3281,7 @@ class TestDatabaseApi(SupersetTestCase):
"sqlalchemy_uri_placeholder": "bigquery://{project_id}",
"engine_information": {
"supports_file_upload": True,
"supports_dynamic_catalog": False,
"disable_ssh_tunneling": True,
},
},
@ -3334,6 +3337,7 @@ class TestDatabaseApi(SupersetTestCase):
"sqlalchemy_uri_placeholder": "redshift+psycopg2://user:password@host:port/dbname[?key=value&key=value...]",
"engine_information": {
"supports_file_upload": True,
"supports_dynamic_catalog": False,
"disable_ssh_tunneling": False,
},
},
@ -3357,6 +3361,7 @@ class TestDatabaseApi(SupersetTestCase):
"sqlalchemy_uri_placeholder": "gsheets://",
"engine_information": {
"supports_file_upload": True,
"supports_dynamic_catalog": False,
"disable_ssh_tunneling": True,
},
},
@ -3412,6 +3417,7 @@ class TestDatabaseApi(SupersetTestCase):
"sqlalchemy_uri_placeholder": "mysql://user:password@host:port/dbname[?key=value&key=value...]",
"engine_information": {
"supports_file_upload": True,
"supports_dynamic_catalog": False,
"disable_ssh_tunneling": False,
},
},
@ -3423,6 +3429,7 @@ class TestDatabaseApi(SupersetTestCase):
"sqlalchemy_uri_placeholder": "engine+driver://user:password@host:port/dbname[?key=value&key=value...]",
"engine_information": {
"supports_file_upload": True,
"supports_dynamic_catalog": False,
"disable_ssh_tunneling": False,
},
},
@ -3455,6 +3462,7 @@ class TestDatabaseApi(SupersetTestCase):
"sqlalchemy_uri_placeholder": "mysql://user:password@host:port/dbname[?key=value&key=value...]",
"engine_information": {
"supports_file_upload": True,
"supports_dynamic_catalog": False,
"disable_ssh_tunneling": False,
},
},
@ -3466,6 +3474,7 @@ class TestDatabaseApi(SupersetTestCase):
"sqlalchemy_uri_placeholder": "engine+driver://user:password@host:port/dbname[?key=value&key=value...]",
"engine_information": {
"supports_file_upload": True,
"supports_dynamic_catalog": False,
"disable_ssh_tunneling": False,
},
},

View File

@ -243,6 +243,7 @@ class TestDatasetApi(SupersetTestCase):
response = json.loads(rv.data.decode("utf-8"))
assert response["count"] == 1
expected_columns = [
"catalog",
"changed_by",
"changed_by_name",
"changed_on_delta_humanized",
@ -368,6 +369,7 @@ class TestDatasetApi(SupersetTestCase):
"cache_timeout": None,
"database": {
"backend": main_db.backend,
"allow_multi_catalog": False,
"database_name": "examples",
"id": 1,
},

View File

@ -517,6 +517,7 @@ class TestSavedQueryApi(SupersetTestCase):
expected_result = {
"id": saved_query.id,
"catalog": None,
"database": {"id": saved_query.database.id, "database_name": "examples"},
"description": "cool description",
"changed_by": None,

View File

@ -237,6 +237,7 @@ def test_database_connection(
"driver": "gsheets",
"engine_information": {
"disable_ssh_tunneling": True,
"supports_dynamic_catalog": False,
"supports_file_upload": True,
},
"expose_in_sqllab": True,
@ -308,6 +309,7 @@ def test_database_connection(
"driver": "gsheets",
"engine_information": {
"disable_ssh_tunneling": True,
"supports_dynamic_catalog": False,
"supports_file_upload": True,
},
"expose_in_sqllab": True,