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.
21 lines
697 B
21 lines
697 B
7 years ago
|
''' Tests for the account resources '''
|
||
|
|
||
|
|
||
|
def test_registration_init():
|
||
|
from ordr.resources.account import RegistrationResource
|
||
|
resource = RegistrationResource(
|
||
|
request='some request',
|
||
|
name='a name',
|
||
|
parent='the parent'
|
||
|
)
|
||
|
assert resource.__name__ == 'a name'
|
||
|
assert resource.__parent__ == 'the parent'
|
||
|
assert resource.request == 'some request'
|
||
|
|
||
|
|
||
|
def test_registration_acl():
|
||
|
from pyramid.security import Allow, Everyone, DENY_ALL
|
||
|
from ordr.resources.account import RegistrationResource
|
||
|
resource = RegistrationResource('some request', 'a name', 'the parent')
|
||
|
assert resource.__acl__() == [(Allow, Everyone, 'view'), DENY_ALL]
|