You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
434 B
15 lines
434 B
7 years ago
|
|
||
|
def test_root_init():
|
||
|
from ordr.resources import RootResource
|
||
|
root = RootResource('request')
|
||
7 years ago
|
assert root.__name__ is None
|
||
|
assert root.__parent__ is None
|
||
7 years ago
|
assert root.request == 'request'
|
||
|
|
||
|
|
||
|
def test_root_acl():
|
||
7 years ago
|
from pyramid.security import Allow, Everyone, DENY_ALL
|
||
7 years ago
|
from ordr.resources import RootResource
|
||
|
root = RootResource(None)
|
||
7 years ago
|
assert root.__acl__() == [(Allow, Everyone, 'view'), DENY_ALL]
|