#NEWLINE# def run_manage( self , args , settings_file = None ) : #NEWLINE# #INDENT# conf_dir = os . path . dirname ( conf . __file__ ) #NEWLINE# template_manage_py = os . path . join ( conf_dir , 'project_template' , 'manage.py' ) #NEWLINE# test_manage_py = os . path . join ( test_dir , 'manage.py' ) #NEWLINE# shutil . copyfile ( template_manage_py , test_manage_py ) #NEWLINE# with open ( test_manage_py , 'r' ) as fp : #NEWLINE# #INDENT# manage_py_contents = fp . read ( ) #NEWLINE# #UNINDENT# manage_py_contents = manage_py_contents . replace ( '{{ project_name }}' , 'regressiontests' ) #NEWLINE# with open ( test_manage_py , 'w' ) as fp : #NEWLINE# #INDENT# fp . write ( manage_py_contents ) #NEWLINE# #UNINDENT# ( stdout , stderr ) = self . run_test ( './manage.py' , args , settings_file ) #NEWLINE# os . remove ( test_manage_py ) #NEWLINE# return ( stdout , stderr )