#NEWLINE# def test_remove_user_from_group( self ) : #NEWLINE# #INDENT# ' Can remove a user from a group ' #NEWLINE# user = make_user ( 'foo' , 'bar' , False ) #NEWLINE# group = Group ( 'g1' ) #NEWLINE# user . groups . add ( group ) #NEWLINE# self . db . add_all ( [ user , group ] ) #NEWLINE# transaction . commit ( ) #NEWLINE# self . access . edit_user_group ( 'foo' , 'g1' , False ) #NEWLINE# transaction . commit ( ) #NEWLINE# self . db . add ( user ) #NEWLINE# self . assertEqual ( len ( user . groups ) , 0 )