#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# super ( TestApp , self ) . setUp ( ) #NEWLINE# if ( self . app is None ) : #NEWLINE# #INDENT# for app in self . service . apps : #NEWLINE# #INDENT# if app . name . startswith ( 'delete-me' ) : #NEWLINE# #INDENT# self . service . apps . delete ( app . name ) #NEWLINE# #UNINDENT# #UNINDENT# self . app_name = testlib . tmpname ( ) #NEWLINE# self . app = self . service . apps . create ( self . app_name ) #NEWLINE# logging . debug ( 'Creating app %s' , self . app_name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# logging . debug ( 'App %s already exists. Skipping creation.' , app . app_name ) #NEWLINE# #UNINDENT# if self . service . restart_required : #NEWLINE# #INDENT# self . service . restart ( 120 ) #NEWLINE# #UNINDENT# return