#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# 'Setup the test' #NEWLINE# super ( BanUserFormTest , self ) . setUp ( ) #NEWLINE# self . group1 = mommy . make ( 'groups.Group' ) #NEWLINE# self . normal_user = mommy . make ( 'accounts.User' ) #NEWLINE# self . normal_user . add_to_group ( self . group1 . pk ) #NEWLINE# self . banned_user = mommy . make ( 'accounts.User' ) #NEWLINE# self . banned_user . add_to_group ( self . group1 . pk ) #NEWLINE# thread = mommy . make ( 'connectmessages.Thread' , group = self . group1 ) #NEWLINE# self . message1 = mommy . make ( 'connectmessages.Message' , sender = self . banned_user , thread = thread ) #NEWLINE# self . message1 . created_at = ( now ( ) - timedelta ( hours = 3 ) ) #NEWLINE# self . message1 . save ( ) #NEWLINE# self . message2 = mommy . make ( 'connectmessages.Message' , sender = self . normal_user , thread = thread ) #NEWLINE# self . thread = Thread . objects . get ( pk = thread . pk )