#NEWLINE# def call_test_db_command( command ) : #NEWLINE# #INDENT# ' Call command on test database ' #NEWLINE# for alias in connections : #NEWLINE# #INDENT# connection = connections [ alias ] #NEWLINE# old_name = connection . settings_dict [ 'NAME' ] #NEWLINE# test_db_name = get_test_db_name ( connection ) #NEWLINE# if ( not old_name . startswith ( 'test_' ) ) : #NEWLINE# #INDENT# reset_connection ( connection , test_db_name ) #NEWLINE# call_command ( command , interactive = False , database = test_db_name . alias , load_initial_data = False ) #NEWLINE# reset_connection ( connection , old_name )