mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
refactor: Ensure Flask framework leverages the Flask-SQLAlchemy session (Phase II) (#26909)
This commit is contained in:
@@ -27,6 +27,7 @@ def test_validate_update_uniqueness(session: Session) -> None:
|
||||
In particular, allow datasets with the same name in the same database as long as they
|
||||
are in different schemas
|
||||
"""
|
||||
from superset import db
|
||||
from superset.connectors.sqla.models import SqlaTable
|
||||
from superset.models.core import Database
|
||||
|
||||
@@ -46,8 +47,8 @@ def test_validate_update_uniqueness(session: Session) -> None:
|
||||
schema="dev",
|
||||
database=database,
|
||||
)
|
||||
session.add_all([database, dataset1, dataset2])
|
||||
session.flush()
|
||||
db.session.add_all([database, dataset1, dataset2])
|
||||
db.session.flush()
|
||||
|
||||
# same table name, different schema
|
||||
assert (
|
||||
|
||||
Reference in New Issue
Block a user