#NEWLINE# def test_fires_added_to_group_signal( self ) : #NEWLINE# #INDENT# '\n        Test that adding a user to a group fires the correct django signal\n\n        Signal test method found at\n        https://stackoverflow.com/questions/3817213/\n        ' #NEWLINE# def add_user_group_signal_receiver( **kwargs ) : #NEWLINE# #INDENT# 'Demo signal for testing' #NEWLINE# self . add_signal_group = kwargs [ 'group' ] #NEWLINE# self . add_signal_user = kwargs [ 'user' ] #NEWLINE# #UNINDENT# group_member_added . connect ( add_user_group_signal_receiver ) #NEWLINE# group = self . create_group ( ) #NEWLINE# user = self . create_user ( ) #NEWLINE# self . assertFalse ( hasattr ( self , 'add_signal_group' ) ) #NEWLINE# self . assertFalse ( hasattr ( self , 'add_signal_user' ) ) #NEWLINE# add_user_to_group ( user_id = user . pk , group_id = group . pk ) #NEWLINE# self . assertEqual ( self . add_signal_group , group ) #NEWLINE# self . assertEqual ( self . add_signal_user , self ) #NEWLINE# group_member_added . disconnect ( receiver = add_user_group_signal_receiver )