#NEWLINE# def test_revoke_user_permission( self ) : #NEWLINE# #INDENT# ' Can revoke user permissions on a package ' #NEWLINE# user = make_user ( 'foo' , 'bar' , False ) #NEWLINE# perm = UserPermission ( 'pkg1' , 'foo' , read = True ) #NEWLINE# self . db . add_all ( [ user , perm ] ) #NEWLINE# transaction . commit ( ) #NEWLINE# self . access . edit_user_permission ( 'pkg1' , 'foo' , 'read' , False ) #NEWLINE# transaction . commit ( ) #NEWLINE# self . db . add ( user ) #NEWLINE# self . assertEqual ( len ( user . permissions ) , 0 )