#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# 'Initial Setup' #NEWLINE# if ( not self . prepared ) : #NEWLINE# #INDENT# ( self . group , created ) = Group . objects . get_or_create ( name = 'test' ) #NEWLINE# ( duser , created ) = DjangoUser . objects . get_or_create ( username = self . username ) #NEWLINE# duser . set_password ( self . password ) #NEWLINE# duser . save ( ) #NEWLINE# ( self . user , created ) = User . objects . get_or_create ( user = duser ) #NEWLINE# self . user . save ( ) #NEWLINE# ( perspective , created ) = Perspective . objects . get_or_create ( name = 'default' ) #NEWLINE# perspective . set_default_user ( ) #NEWLINE# perspective . save ( ) #NEWLINE# ModuleSetting . set ( 'default_perspective' , perspective . id ) #NEWLINE# self . client = Client ( ) #NEWLINE# self . prepared = True