This is an automated email from the ASF dual-hosted git repository.
yjc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 738bd04b4f fix(test): make test_clean_requests_after_schema_grant more
idempotent (#19625)
738bd04b4f is described below
commit 738bd04b4fde728474233e562a97a6c84efc8049
Author: Jesse Yang <[email protected]>
AuthorDate: Sat Apr 9 07:48:37 2022 -0700
fix(test): make test_clean_requests_after_schema_grant more idempotent
(#19625)
---
tests/integration_tests/access_tests.py | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/tests/integration_tests/access_tests.py
b/tests/integration_tests/access_tests.py
index 13febbd413..abefc58c9b 100644
--- a/tests/integration_tests/access_tests.py
+++ b/tests/integration_tests/access_tests.py
@@ -374,6 +374,7 @@ class TestRequestAccess(SupersetTestCase):
.filter_by(table_name="wb_health_population")
.first()
)
+ original_schema = ds.schema
ds.schema = "temp_schema"
security_manager.add_permission_view_menu("schema_access",
ds.schema_perm)
@@ -394,13 +395,7 @@ class TestRequestAccess(SupersetTestCase):
gamma_user = security_manager.find_user(username="gamma")
gamma_user.roles.remove(security_manager.find_role(SCHEMA_ACCESS_ROLE))
- ds = (
- session.query(SqlaTable)
- .filter_by(table_name="wb_health_population")
- .first()
- )
- ds.schema = None
-
+ ds.schema = original_schema
session.commit()
@mock.patch("superset.utils.core.send_mime_email")