mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Formatting and linting changes
This commit is contained in:
@@ -202,7 +202,11 @@ def test_service_setting_link_toggles_index_error(
|
||||
("permissions", "permissions_text", "visible"),
|
||||
[
|
||||
("sms", "inbound SMS", True),
|
||||
(ServicePermission.INBOUND_SMS, "inbound SMS", False), # no sms parent permission
|
||||
(
|
||||
ServicePermission.INBOUND_SMS,
|
||||
"inbound SMS",
|
||||
False,
|
||||
), # no sms parent permission
|
||||
# also test no permissions set
|
||||
("", "inbound SMS", False),
|
||||
],
|
||||
|
||||
@@ -182,10 +182,12 @@ def test_should_show_create_api_key_page(
|
||||
for index, option in enumerate(expected_options):
|
||||
item = page.select(".usa-radio")[index]
|
||||
if type(option) is tuple:
|
||||
assert normalize_spaces(item.select_one(".usa-label").text) == option[0]
|
||||
assert (
|
||||
normalize_spaces(item.select_one(".usa-radio__label").text) == option[0]
|
||||
)
|
||||
assert normalize_spaces(item.select_one(".usa-hint").text) == option[1]
|
||||
else:
|
||||
assert normalize_spaces(item.select_one(".usa-label").text) == option
|
||||
assert normalize_spaces(item.select_one(".usa-radio__label").text) == option
|
||||
|
||||
|
||||
def test_should_create_api_key_with_type_normal(
|
||||
|
||||
@@ -966,7 +966,7 @@ def test_menu_manage_service(
|
||||
ServicePermission.VIEW_ACTIVITY,
|
||||
ServicePermission.MANAGE_TEMPLATES,
|
||||
ServicePermission.MANAGE_USERS,
|
||||
ServicePermission.MANAGE_SETTINGS
|
||||
ServicePermission.MANAGE_SETTINGS,
|
||||
],
|
||||
)
|
||||
page = str(page)
|
||||
|
||||
@@ -36,7 +36,11 @@ def test_permissions(
|
||||
request.view_args.update({"service_id": "foo"})
|
||||
|
||||
api_user_active["permissions"] = {
|
||||
"foo": [ServicePermission.MANAGE_USERS, ServicePermission.MANAGE_TEMPLATES, ServicePermission.MANAGE_SETTINGS]
|
||||
"foo": [
|
||||
ServicePermission.MANAGE_USERS,
|
||||
ServicePermission.MANAGE_TEMPLATES,
|
||||
ServicePermission.MANAGE_SETTINGS,
|
||||
]
|
||||
}
|
||||
api_user_active["services"] = ["foo", "bar"]
|
||||
|
||||
@@ -66,7 +70,11 @@ def test_permissions_forbidden(
|
||||
request.view_args.update({"service_id": "foo"})
|
||||
|
||||
api_user_active["permissions"] = {
|
||||
"foo": [ServicePermission.MANAGE_USERS, ServicePermission.MANAGE_TEMPLATES, ServicePermission.MANAGE_SETTINGS]
|
||||
"foo": [
|
||||
ServicePermission.MANAGE_USERS,
|
||||
ServicePermission.MANAGE_TEMPLATES,
|
||||
ServicePermission.MANAGE_SETTINGS,
|
||||
]
|
||||
}
|
||||
api_user_active["services"] = ["foo", "bar"]
|
||||
|
||||
@@ -179,7 +187,11 @@ def test_user_with_no_permissions_to_service_goes_to_templates(
|
||||
api_user_active,
|
||||
):
|
||||
api_user_active["permissions"] = {
|
||||
"foo": [ServicePermission.MANAGE_USERS, ServicePermission.MANAGE_TEMPLATES, ServicePermission.MANAGE_SETTINGS]
|
||||
"foo": [
|
||||
ServicePermission.MANAGE_USERS,
|
||||
ServicePermission.MANAGE_TEMPLATES,
|
||||
ServicePermission.MANAGE_SETTINGS,
|
||||
]
|
||||
}
|
||||
api_user_active["services"] = ["foo", "bar"]
|
||||
client_request.login(api_user_active)
|
||||
|
||||
Reference in New Issue
Block a user