Skip to content

Commit

Permalink
chore(tests): Fix MySQL logic
Browse files Browse the repository at this point in the history
  • Loading branch information
john-bodley committed Jun 25, 2024
1 parent 31afb62 commit 2d315c6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
6 changes: 1 addition & 5 deletions tests/integration_tests/databases/commands_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1107,11 +1107,7 @@ def test_database_tables_list_with_unknown_database(self, mock_find_by_id):
def test_database_tables_superset_exception(
self, mock_g, mock_can_access_database, mock_find_by_id
):
database = get_example_database()
if database.backend == "mysql":
return

mock_find_by_id.return_value = database
mock_find_by_id.return_value = get_example_database()
mock_can_access_database.side_effect = SupersetException("Test Error")
mock_g.user = security_manager.find_user("admin")

Expand Down
5 changes: 0 additions & 5 deletions tests/integration_tests/reports/commands_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1548,8 +1548,6 @@ def test_report_schedule_working_timeout(create_report_slack_chart_working):
datetime.utcnow(),
).run()

# Only needed for MySQL, understand why
db.session.commit()
logs = db.session.query(ReportExecutionLog).all()
# Two logs, first is created by fixture
assert len(logs) == 2
Expand Down Expand Up @@ -2076,9 +2074,6 @@ def test_grace_period_error(email_mock, create_invalid_sql_alert_email_chart):
datetime.utcnow(),
).run()

# Only needed for MySQL, understand why
db.session.commit()

# Assert the email smtp address, asserts a notification was sent with the error
assert email_mock.call_args[0][0] == DEFAULT_OWNER_EMAIL
assert (
Expand Down

0 comments on commit 2d315c6

Please sign in to comment.