mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
Use config[] not config.get() (#8454)
* Typo fix in CONTRIBUTING.md
* Alter references to config.get('FOO') to use preferred config['FOO']
* Set missing configuration constants in superset/config.py
* Misc. CI fixes
* Add type annotation for FEATURE_FLATGS
This commit is contained in:
committed by
Maxime Beauchemin
parent
3cba1bd990
commit
e4ca44e95f
@@ -212,7 +212,7 @@ class RequestAccessTests(SupersetTestCase):
|
||||
# Check if access request for gamma at energy_usage was deleted
|
||||
|
||||
# gamma2 and gamma request table_role on energy usage
|
||||
if app.config.get("ENABLE_ACCESS_REQUEST"):
|
||||
if app.config["ENABLE_ACCESS_REQUEST"]:
|
||||
access_request1 = create_access_request(
|
||||
session, "table", "random_time_series", TEST_ROLE_1, "gamma2"
|
||||
)
|
||||
@@ -354,7 +354,7 @@ class RequestAccessTests(SupersetTestCase):
|
||||
|
||||
@mock.patch("superset.utils.core.send_MIME_email")
|
||||
def test_approve(self, mock_send_mime):
|
||||
if app.config.get("ENABLE_ACCESS_REQUEST"):
|
||||
if app.config["ENABLE_ACCESS_REQUEST"]:
|
||||
session = db.session
|
||||
TEST_ROLE_NAME = "table_role"
|
||||
security_manager.add_role(TEST_ROLE_NAME)
|
||||
@@ -481,7 +481,7 @@ class RequestAccessTests(SupersetTestCase):
|
||||
session.commit()
|
||||
|
||||
def test_request_access(self):
|
||||
if app.config.get("ENABLE_ACCESS_REQUEST"):
|
||||
if app.config["ENABLE_ACCESS_REQUEST"]:
|
||||
session = db.session
|
||||
self.logout()
|
||||
self.login(username="gamma")
|
||||
|
||||
Reference in New Issue
Block a user