chore(engine): adapt postgres backend connection URI (#11233)

* chore(engine): adapt postgres backend connection URI

* fix tests

* Update superset/db_engine_specs/__init__.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
This commit is contained in:
Yongjie Zhao
2020-10-14 23:57:41 +08:00
committed by GitHub
parent 5cbef88217
commit 22d8171dd6
4 changed files with 13 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ from unittest import mock
from sqlalchemy import column, literal_column
from sqlalchemy.dialects import postgresql
from superset.db_engine_specs import engines
from superset.db_engine_specs.postgres import PostgresEngineSpec
from tests.db_engine_specs.base_tests import TestDbEngineSpec
@@ -117,3 +118,9 @@ class TestPostgresDbEngineSpec(TestDbEngineSpec):
cursor.description = []
results = PostgresEngineSpec.fetch_data(cursor, 1000)
self.assertEqual(results, [])
def test_engine_alias_name(self):
"""
DB Eng Specs (postgres): Test "postgres" in engine spec
"""
self.assertIn("postgres", engines)