Skip to content

Commit

Permalink
trimming unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed May 25, 2024
1 parent fc7e95d commit 7494c8a
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions tests/unit_tests/datasource/dao_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@

@pytest.fixture
def session_with_data(session: Session) -> Iterator[Session]:
from superset.columns.models import Column
from superset.connectors.sqla.models import SqlaTable, TableColumn
from superset.datasets.models import Dataset
from superset.models.core import Database
from superset.models.sql_lab import Query, SavedQuery
from superset.tables.models import Table

engine = session.get_bind()
SqlaTable.metadata.create_all(engine) # pylint: disable=no-member
Expand Down Expand Up @@ -65,32 +62,6 @@ def session_with_data(session: Session) -> Iterator[Session]:

saved_query = SavedQuery(database=database, sql="select * from foo")

table = Table(
name="my_table",
schema="my_schema",
catalog="my_catalog",
database=database,
columns=[],
)

dataset = Dataset(
database=table.database,
name="positions",
expression="""
SELECT array_agg(array[longitude,latitude]) AS position
FROM my_catalog.my_schema.my_table
""",
tables=[table],
columns=[
Column(
name="position",
expression="array_agg(array[longitude,latitude])",
),
],
)

session.add(dataset)
session.add(table)
session.add(saved_query)
session.add(query_obj)
session.add(database)
Expand Down

0 comments on commit 7494c8a

Please sign in to comment.