mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
test: autouse app_context in unit tests (#20911)
This commit is contained in:
@@ -21,7 +21,7 @@ import copy
|
||||
from sqlalchemy.orm.session import Session
|
||||
|
||||
|
||||
def test_import_database(app_context: None, session: Session) -> None:
|
||||
def test_import_database(session: Session) -> None:
|
||||
"""
|
||||
Test importing a database.
|
||||
"""
|
||||
@@ -48,9 +48,7 @@ def test_import_database(app_context: None, session: Session) -> None:
|
||||
assert database.external_url is None
|
||||
|
||||
|
||||
def test_import_database_managed_externally(
|
||||
app_context: None, session: Session
|
||||
) -> None:
|
||||
def test_import_database_managed_externally(session: Session) -> None:
|
||||
"""
|
||||
Test importing a database that is managed externally.
|
||||
"""
|
||||
|
||||
@@ -21,7 +21,7 @@ from sqlalchemy.orm.session import Session
|
||||
from superset.databases.utils import make_url_safe
|
||||
|
||||
|
||||
def test_make_url_safe_string(app_context: None, session: Session) -> None:
|
||||
def test_make_url_safe_string(session: Session) -> None:
|
||||
"""
|
||||
Test converting a string to a safe uri
|
||||
"""
|
||||
@@ -31,7 +31,7 @@ def test_make_url_safe_string(app_context: None, session: Session) -> None:
|
||||
assert uri_safe == make_url(uri_string)
|
||||
|
||||
|
||||
def test_make_url_safe_url(app_context: None, session: Session) -> None:
|
||||
def test_make_url_safe_url(session: Session) -> None:
|
||||
"""
|
||||
Test converting a url to a safe uri
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user