mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
chore(database): Creating helper make_url_safe to wrap potential errors (#19526)
* Creating helper make_url_safe to wrap potential errors * Fixing imports * Fixing imports again * Adding comment * Linting * Fixing test * Fixing test again... * Fixing import
This commit is contained in:
@@ -24,6 +24,8 @@ import os
|
||||
import re
|
||||
from typing import Any, Tuple, List, Optional
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from superset.databases.commands.exceptions import DatabaseInvalidError
|
||||
from tests.integration_tests.fixtures.birth_names_dashboard import (
|
||||
load_birth_names_dashboard_with_slices,
|
||||
load_birth_names_data,
|
||||
@@ -736,7 +738,7 @@ class TestUtils(SupersetTestCase):
|
||||
db.session.commit()
|
||||
|
||||
def test_get_or_create_db_invalid_uri(self):
|
||||
with self.assertRaises(ArgumentError):
|
||||
with self.assertRaises(DatabaseInvalidError):
|
||||
get_or_create_db("test_db", "yoursql:superset.db/()")
|
||||
|
||||
def test_get_iterable(self):
|
||||
|
||||
Reference in New Issue
Block a user