#NEWLINE# def testMissingAclRefs( self ) : #NEWLINE# #INDENT# collModel = self . model ( 'collection' ) #NEWLINE# coll = collModel . setAccessList ( collModel . collection , { #NEWLINE# #INDENT# 'users' : [ { #NEWLINE# #INDENT# 'id' : ObjectId ( ) , #NEWLINE# 'level' : AccessType . READ , #NEWLINE# #UNINDENT# } ] , #NEWLINE# 'groups' : [ { #NEWLINE# #INDENT# 'id' : ObjectId ( ) , #NEWLINE# 'level' : AccessType . READ , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } , save = True ) #NEWLINE# self . assertEqual ( len ( coll [ 'access' ] [ 'users' ] ) , 1 ) #NEWLINE# self . assertEqual ( len ( coll [ 'access' ] [ 'groups' ] ) , 1 ) #NEWLINE# acl = collModel . getFullAccessList ( coll ) #NEWLINE# self . assertEqual ( acl , { #NEWLINE# #INDENT# 'users' : [ ] , #NEWLINE# 'groups' : [ ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# coll = collModel . load ( coll [ '_id' ] , force = True ) #NEWLINE# self . assertEqual ( acl , coll [ 'access' ] )