Opened 10 years ago

Closed 10 years ago

#23652 closed Bug (fixed)

Database name is not reset after destroying test database

Reported by: Bjarkias Owned by: nobody
Component: Testing framework Version: 1.7
Severity: Normal Keywords: test destroy_test_db
Cc: Claude Paroz Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Bjarkias)

When using connection.creation.destroy_test_db(old_db_name) the settings.DATABASES default name isn't reset to old_db_name like described in in docshttps://docs.djangoproject.com/en/1.6/topics/testing/advanced/#django.db.connection.creation.destroy_test_db.

Change History (7)

comment:1 by Bjarkias, 10 years ago

Description: modified (diff)

comment:2 by Bjarkias, 10 years ago

Type: UncategorizedBug

comment:3 by Tim Graham, 10 years ago

Cc: Claude Paroz added
Triage Stage: UnreviewedAccepted
Version: 1.61.7

Behavior changed in e953c78eeb81ee69dccd356145563fd6f9e4c7b6 (1.7). Claude, I wonder what you think we should do? I'm not sure if we should update the documentation or the code.

comment:4 by Claude Paroz, 10 years ago

In my commit, I just removed the NAME attribution in a copied dict. Probably the real commit that changed this is https://github.com/django/django/commit/f1dc83cb9877d349df88674a0752ddf42657485b#diff-f0b4f23d2d3eab42aeb0ff91a1b4d9f7L322

So yes, restoring the original database name is currently missing.

comment:6 by Tim Graham, 10 years ago

Triage Stage: AcceptedReady for checkin

comment:7 by Claude Paroz <claude@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 45db842c9bcd6f9afe274c120f43847657473839:

Fixed #23652 -- Restored database name after destroying test database

Thanks Bjarkias for the report.

Note: See TracTickets for help on using tickets.
Back to Top