mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 08:16:51 -04:00
Check for unknown permissions
This guards against anyone mispelling or using the wrong words for a permission, which could introduce unexpected or hard to catch errors.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import pytest
|
||||
from app.notify_client.user_api_client import User
|
||||
|
||||
|
||||
@@ -25,3 +26,6 @@ def test_user():
|
||||
# set failed logins to threshold
|
||||
user.failed_login_count = 3
|
||||
assert user.is_locked()
|
||||
|
||||
with pytest.raises(TypeError):
|
||||
user.has_permissions('to_do_bad_things')
|
||||
|
||||
Reference in New Issue
Block a user