Fix: Update test_permissions.py to use new exchange permissions

This commit is contained in:
counterweight 2025-12-22 20:23:41 +01:00
parent edc292986f
commit 743129b11d
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C

View file

@ -50,10 +50,10 @@ class TestRoleAssignment:
data = response.json() data = response.json()
permissions = data["permissions"] permissions = data["permissions"]
# Should have profile and booking permissions # Should have profile and exchange permissions
assert Permission.MANAGE_OWN_PROFILE.value in permissions assert Permission.MANAGE_OWN_PROFILE.value in permissions
assert Permission.BOOK_APPOINTMENT.value in permissions assert Permission.CREATE_EXCHANGE.value in permissions
assert Permission.VIEW_OWN_APPOINTMENTS.value in permissions assert Permission.VIEW_OWN_EXCHANGES.value in permissions
# Should NOT have audit permission # Should NOT have audit permission
assert Permission.VIEW_AUDIT.value not in permissions assert Permission.VIEW_AUDIT.value not in permissions
@ -69,8 +69,8 @@ class TestRoleAssignment:
# Should have audit permission # Should have audit permission
assert Permission.VIEW_AUDIT.value in permissions assert Permission.VIEW_AUDIT.value in permissions
# Should NOT have booking permissions (those are for regular users) # Should NOT have exchange permissions (those are for regular users)
assert Permission.BOOK_APPOINTMENT.value not in permissions assert Permission.CREATE_EXCHANGE.value not in permissions
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_user_with_no_roles_has_no_permissions( async def test_user_with_no_roles_has_no_permissions(