tiramisu/tests/test_option_permissions.py

37 lines
1.1 KiB
Python
Raw Permalink Normal View History

2023-02-27 12:33:11 +01:00
"configuration objects global API"
from .autopath import do_autopath
do_autopath()
import pytest
from tiramisu import PermissionsOption
def test_permissions():
PermissionsOption('a', '', 640)
PermissionsOption('a', '', 642)
PermissionsOption('a', '', 751)
PermissionsOption('a', '', 753)
PermissionsOption('a', '', 7555)
PermissionsOption('a', '', 1755)
with pytest.raises(ValueError):
PermissionsOption('a', '', 800)
with pytest.raises(ValueError):
PermissionsOption('a', '', 75)
with pytest.raises(ValueError):
PermissionsOption('a', '', 77775)
with pytest.raises(ValueError):
PermissionsOption('a', '', '755')
with pytest.raises(ValueError):
PermissionsOption('a', '', 'string')
with pytest.raises(ValueError):
PermissionsOption('a', '', 800)
with pytest.raises(ValueError):
PermissionsOption('a', '', 1575)
with pytest.raises(ValueError):
PermissionsOption('a', '', 1557)
with pytest.raises(ValueError):
PermissionsOption('a', '', 777)
with pytest.raises(ValueError):
PermissionsOption('a', '', 1777)