john-bodley commented on code in PR #26909:
URL: https://github.com/apache/superset/pull/26909#discussion_r1475204609
##########
tests/unit_tests/charts/dao/dao_tests.py:
##########
@@ -37,18 +38,18 @@ def session_with_data(session: Session) ->
Iterator[Session]:
datasource_name="tmp_perm_table",
slice_name="slice_name",
)
- session.add(slice_obj)
+ db.session.add(slice_obj)
- session.commit()
+ db.session.commit()
yield session
- session.rollback()
+ db.session.rollback()
def test_slice_find_by_id_skip_base_filter(session_with_data: Session) -> None:
Review Comment:
See https://github.com/apache/superset/pull/26909#issuecomment-1922328534.
##########
tests/unit_tests/tags/commands/create_test.py:
##########
@@ -56,12 +60,12 @@ def session_with_data(session: Session):
published=True,
)
- session.add(slice_obj)
- session.add(db)
- session.add(saved_query)
- session.add(dashboard_obj)
- session.commit()
- yield session
+ db.session.add(slice_obj)
+ db.session.add(database)
+ db.session.add(saved_query)
+ db.session.add(dashboard_obj)
+ db.session.commit()
+ yield db.session
def test_create_command_success(session_with_data: Session, mocker:
MockFixture):
Review Comment:
See https://github.com/apache/superset/pull/26909#issuecomment-1922328534.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]