Skip to content

Commit

Permalink
Black
Browse files Browse the repository at this point in the history
  • Loading branch information
geido committed Feb 9, 2024
1 parent e4e1c14 commit 3c4cdb2
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
from importlib import import_module

from superset import db
from superset.migrations.shared.security_converge import _find_pvm, Permission, PermissionView, ViewMenu
from superset.migrations.shared.security_converge import (
_find_pvm,
Permission,
PermissionView,
ViewMenu,
)
from tests.integration_tests.test_app import app

migration_module = import_module(
Expand All @@ -28,6 +33,7 @@
upgrade = migration_module.do_upgrade
downgrade = migration_module.do_downgrade


def test_migration_upgrade():
with app.app_context():
pre_perm = PermissionView(
Expand All @@ -45,11 +51,11 @@ def test_migration_upgrade():
assert _find_pvm(db.session, "Dashboard", "can_view_query") is not None
assert _find_pvm(db.session, "Dashboard", "can_view_and_drill") is None


def test_migration_downgrade():
with app.app_context():
downgrade(db.session)

assert _find_pvm(db.session, "Dashboard", "can_view_chart_as_table") is None
assert _find_pvm(db.session, "Dashboard", "can_view_query") is None
assert _find_pvm(db.session, "Dashboard", "can_view_and_drill") is not None

0 comments on commit 3c4cdb2

Please sign in to comment.