@ -32,6 +32,7 @@ def test_registration_token_acl():
DENY_ALL
DENY_ALL
]
]
def test_email_verification_token_acl ( app_config ) :
def test_email_verification_token_acl ( app_config ) :
''' test the access controll list of the email token resource '''
''' test the access controll list of the email token resource '''
from pyramid . security import Allow , Authenticated , Deny , Everyone , DENY_ALL
from pyramid . security import Allow , Authenticated , Deny , Everyone , DENY_ALL
@ -44,6 +45,7 @@ def test_email_verification_token_acl(app_config):
assert resource . __acl__ ( ) == [ ( Allow , ' user:3 ' , ' settings ' ) , DENY_ALL ]
assert resource . __acl__ ( ) == [ ( Allow , ' user:3 ' , ' settings ' ) , DENY_ALL ]
def test_password_reset_token_acl ( ) :
def test_password_reset_token_acl ( ) :
''' test the access controll list of the password token resource '''
''' test the access controll list of the password token resource '''
from pyramid . security import Allow , Everyone , DENY_ALL
from pyramid . security import Allow , Everyone , DENY_ALL
@ -57,6 +59,7 @@ def test_password_reset_token_acl():
DENY_ALL
DENY_ALL
]
]
def test_account_resource_init ( ) :
def test_account_resource_init ( ) :
''' test __init__ function of base resource '''
''' test __init__ function of base resource '''
from ordr2 . resources . account import AccountResource
from ordr2 . resources . account import AccountResource
@ -69,6 +72,7 @@ def test_account_resource_init():
assert resource . request == root . request
assert resource . request == root . request
assert resource . model == root . request . user
assert resource . model == root . request . user
def test_account_resource_acl ( ) :
def test_account_resource_acl ( ) :
''' test the access controll list of the account resource '''
''' test the access controll list of the account resource '''
from pyramid . security import Allow , Authenticated , Deny , Everyone , DENY_ALL
from pyramid . security import Allow , Authenticated , Deny , Everyone , DENY_ALL
@ -87,6 +91,7 @@ def test_account_resource_acl():
DENY_ALL
DENY_ALL
]
]
def test_account_resource_getitem_token_ok ( app_config , dbsession ) :
def test_account_resource_getitem_token_ok ( app_config , dbsession ) :
''' test __getitem__ method returns correct token '''
''' test __getitem__ method returns correct token '''
from ordr2 . models . account import TokenSubject
from ordr2 . models . account import TokenSubject