Break class method for ccpo perms into two methods instead of switching on a kwarg to determine if perms are given or removed

This commit is contained in:
leigh-mil
2019-08-09 09:51:47 -04:00
parent 0b2c7f5957
commit feb24b8e16
3 changed files with 17 additions and 13 deletions

View File

@@ -87,13 +87,15 @@ def test_get_ccpo_users():
assert rando not in ccpo_users
def test_update_ccpo_permissions():
def test_give_ccpo_perms():
rando = UserFactory.create()
Users.update_ccpo_permissions(rando, add_perms=True)
ccpo = UserFactory.create_ccpo()
Users.update_ccpo_permissions(ccpo)
Users.give_ccpo_perms(rando)
ccpo_users = Users.get_ccpo_users()
assert rando in ccpo_users
def test_revoke_ccpo_perms():
ccpo = UserFactory.create_ccpo()
Users.revoke_ccpo_perms(ccpo)
ccpo_users = Users.get_ccpo_users()
assert ccpo not in ccpo_users