def reset_connection(connection, new_name):
    connection.close()
    connection.settings_dict["NAME"] = new_name
    connection.features.confirm()
    connection.cursor()
Change database name
dataset/ETHPy150Open plus500s/django-test-tools/test_tools/signals.py/reset_connection