#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# self . user = UserFactory ( username = 'test_model_user' , password = 'test' , email = 'test_model_user@test.com' ) #NEWLINE# self . worker = WorkerFactory ( user = self . user ) #NEWLINE# type_ = CommunicationPreference . CommunicationType . TASK_STATUS_CHANGE #NEWLINE# self . comm_pref = CommunicationPreference . objects . create ( worker = self . worker , communication_type = type_ . value , methods = CommunicationPreference . get_default_methods ( ) )