FrancescoCastaldi commented on code in PR #45205:
URL: https://github.com/apache/superset/pull/45205#discussion_r4243558760
##########
tests/unit_tests/db_engine_specs/test_mssql.py:
##########
@@ -879,3 +879,22 @@ def
test_get_catalog_from_engine_params_empty_database_query_param_falls_back_to
)
assert "database" not in url.query
assert MssqlEngineSpec.get_catalog_from_engine_params(url, {}) == "path_db"
+
+
+def test_azure_synapse_properties() -> None:
+ from superset.db_engine_specs.mssql import AzureSynapseSpec,
MssqlEngineSpec
+
+ assert AzureSynapseSpec.engine == "mssql"
+ assert AzureSynapseSpec.engine_name == "Azure Synapse"
+ assert AzureSynapseSpec.default_driver == "pyodbc"
+ assert issubclass(AzureSynapseSpec, MssqlEngineSpec)
+
+
+def test_azure_synapse_metadata() -> None:
+ from superset.db_engine_specs.mssql import AzureSynapseSpec
+
+ metadata = AzureSynapseSpec.metadata
+ assert "Azure Synapse Analytics" in metadata["description"]
+ assert metadata["logo"] == "azure.svg"
+ assert "pymssql" in metadata["pypi_packages"]
Review Comment:
`AzureSynapseSpec` in `superset/db_engine_specs/mssql.py` defines `metadata
= {'connection_string': 'mssql+pymssql://...', 'pypi_packages': ['pymssql']}`.
The unit test asserts the spec's existing metadata definition as implemented in
the codebase.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]