atst/tests/domain/test_roles.py
2019-03-15 07:14:49 -04:00

19 lines
427 B
Python

import pytest
from atst.domain.permission_sets import PermissionSets
from atst.domain.exceptions import NotFoundError
def test_get_all_roles():
roles = PermissionSets.get_all()
assert roles
def test_get_existing_role():
role = PermissionSets.get("developer")
assert role.name == "developer"
def test_get_nonexistent_role():
with pytest.raises(NotFoundError):
PermissionSets.get("nonexistent")