fix: show custom errors in SQL Lab (#14959)

* fix: show custom errors in SQL Lab

* Fix lint

* Fix test

* Update superset/views/base.py

Co-authored-by: ʈᵃᵢ <tai@apache.org>

* Fix lint

* Debug failing test

* Remove print()

* Debug flaky tests

* Fix test

Co-authored-by: ʈᵃᵢ <tai@apache.org>
This commit is contained in:
Beto Dealmeida
2021-06-10 15:20:31 -07:00
committed by GitHub
parent f8b270d419
commit cc2b4fe3f4
5 changed files with 35 additions and 4 deletions

View File

@@ -75,6 +75,9 @@ class TestSqlLab(SupersetTestCase):
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
def test_sql_json(self):
examples_db = get_example_database()
engine_name = examples_db.db_engine_spec.engine_name
self.login("admin")
data = self.run_sql("SELECT * FROM birth_names LIMIT 10", "1")
@@ -91,7 +94,8 @@ class TestSqlLab(SupersetTestCase):
"code": 1002,
"message": "Issue 1002 - The database returned an unexpected error.",
}
]
],
"engine_name": engine_name,
}
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")