Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida committed Aug 28, 2022
1 parent c9f6b4a commit bfb87d7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion superset/databases/commands/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, parameters: Dict[str, Any]):

def run(self) -> None:
engine = self._properties["engine"]
driver = self._properties["driver"]
driver = self._properties.get("driver")

if engine in BYPASS_VALIDATION_ENGINES:
# Skip engines that are only validated onCreate
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/databases/api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,7 @@ def test_test_connection_failed(self):
expected_response = {
"errors": [
{
"message": "Could not load database driver: AzureSynapseSpec",
"message": "Could not load database driver: MssqlEngineSpec",
"error_type": "GENERIC_COMMAND_ERROR",
"level": "warning",
"extra": {
Expand Down
6 changes: 5 additions & 1 deletion tests/integration_tests/db_engine_specs/postgres_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ def test_engine_alias_name(self):
"""
DB Eng Specs (postgres): Test "postgres" in engine spec
"""
self.assertIn("postgres", [engine.engine for engine in load_engine_specs()])
backends = set()
for engine in load_engine_specs():
backends.add(engine.engine)
backends.update(engine.engine_aliases)
assert "postgres" in backends

def test_extras_without_ssl(self):
db = mock.Mock()
Expand Down

0 comments on commit bfb87d7

Please sign in to comment.