''' Test package for ordr2.resources ''' import pytest def test_root_resource_init(): ''' test __init__ function of root resource ''' from ordr2.resources import RootResource resource = RootResource('request object') assert resource.__name__ is None assert resource.__parent__ is None assert resource.request == 'request object' def test_root_resource_acl(): ''' test __acl__ function of root resource ''' from ordr2.resources import RootResource from pyramid.security import Allow, Everyone, DENY_ALL root = RootResource('request object') assert root.__acl__() == [ (Allow, Everyone, 'view'), DENY_ALL ]