Update route function to revoke CCPO superuser status
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from flask import url_for
|
||||
|
||||
from atst.domain.users import Users
|
||||
from atst.utils.localization import translate
|
||||
|
||||
from tests.factories import UserFactory
|
||||
@@ -45,10 +46,19 @@ def test_confirm_new_user(user_session, client):
|
||||
)
|
||||
assert new_user.dod_id in response.data.decode()
|
||||
|
||||
# give person with out ATAT account CCPO permissions
|
||||
# give person without ATAT account CCPO permissions
|
||||
response = client.post(
|
||||
url_for("ccpo.confirm_new_user"),
|
||||
data={"dod_id": random_dod_id},
|
||||
follow_redirects=True,
|
||||
)
|
||||
assert random_dod_id not in response.data.decode()
|
||||
|
||||
|
||||
def test_remove_access(user_session, client):
|
||||
ccpo = UserFactory.create_ccpo()
|
||||
user = UserFactory.create_ccpo()
|
||||
user_session(ccpo)
|
||||
|
||||
response = client.post(url_for("ccpo.remove_access", user_id=user.id))
|
||||
assert user not in Users.get_ccpo_users()
|
||||
|
Reference in New Issue
Block a user