mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-01 12:19:47 -04:00
remove any_ from has_permissions
we branch on any_ to either say "require ALL these permissions" or "require ANY of these permissions". But we only ever call the decorator with one permission, or with any_=True, so it's unnecessary
This commit is contained in:
@@ -70,8 +70,7 @@ def test_user_has_permissions_or(
|
||||
client,
|
||||
user,
|
||||
['send_messages', 'manage_service'],
|
||||
True,
|
||||
kwargs={'any_': True})
|
||||
True)
|
||||
|
||||
|
||||
def test_user_has_permissions_multiple(
|
||||
|
||||
@@ -1931,7 +1931,7 @@ def mock_no_inbound_number_for_service(mocker):
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_has_permissions(mocker):
|
||||
def _has_permission(*permissions, any_=False, restrict_admin_usage=False):
|
||||
def _has_permission(*permissions, restrict_admin_usage=False):
|
||||
return True
|
||||
|
||||
return mocker.patch(
|
||||
|
||||
Reference in New Issue
Block a user