mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
b64b1b2e1a
Previously, this test could modify global state by changing connection.settings_dict. This dict is a reference to the same dict as django.db.connections.databases['default'], which is thus also changed. The cleanup of this test would replace connection.settings_dic` with a saved copy, which would leave the dict itself modified. Additionally, create_test_db() would also modify these same dicts, as well as settings.databases['default']['NAME'] by adding a "test_" prefix, which is what can cause problems later. This patch: - makes a complete copy of the connection and work on that, to improve isolation. - calls destroy_test_db() to let that code clean up anything done by create_test_db(). |
||
---|---|---|
.. | ||
__init__.py | ||
test_base.py | ||
test_creation.py | ||
test_features.py | ||
test_operations.py | ||
test_schema.py |