[Django] #23652: Database name is not reset after destroying test database

6 views
Skip to first unread message

Django

unread,
Oct 14, 2014, 6:19:53 AM10/14/14
to django-...@googlegroups.com
#23652: Database name is not reset after destroying test database
-----------------------------------+----------------------------------
Reporter: Bjarkias | Owner: nobody
Type: Uncategorized | Status: new
Component: Testing framework | Version: 1.6
Severity: Normal | Keywords: test destroy_test_db
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+----------------------------------
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
docs[https://docs.djangoproject.com/en/1.6/topics/testing/advanced/#django.db.connection.creation.destroy_test_db].

--
Ticket URL: <https://code.djangoproject.com/ticket/23652>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 14, 2014, 6:20:46 AM10/14/14
to django-...@googlegroups.com
#23652: Database name is not reset after destroying test database
-------------------------------------+-------------------------------------

Reporter: Bjarkias | Owner: nobody
Type: Uncategorized | Status: new
Component: Testing framework | Version: 1.6
Severity: Normal | Resolution:
Keywords: test | Triage Stage:
destroy_test_db | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Bjarkias):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Old description:

> 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
> docs[https://docs.djangoproject.com/en/1.6/topics/testing/advanced/#django.db.connection.creation.destroy_test_db].

New description:

When using connection.creation.destroy_test_db(old_db_name) the
settings.DATABASES default name isn't reset to old_db_name like described

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23652#comment:1>

Django

unread,
Oct 14, 2014, 6:27:12 AM10/14/14
to django-...@googlegroups.com
#23652: Database name is not reset after destroying test database
-------------------------------------+-------------------------------------
Reporter: Bjarkias | Owner: nobody
Type: Bug | Status: new

Component: Testing framework | Version: 1.6
Severity: Normal | Resolution:
Keywords: test | Triage Stage:
destroy_test_db | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Bjarkias):

* type: Uncategorized => Bug


--
Ticket URL: <https://code.djangoproject.com/ticket/23652#comment:2>

Django

unread,
Oct 23, 2014, 2:48:06 PM10/23/14
to django-...@googlegroups.com
#23652: Database name is not reset after destroying test database
--------------------------------------+------------------------------------
Reporter: Bjarkias | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.7
Severity: Normal | Resolution:
Keywords: test destroy_test_db | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* cc: claudep (added)
* version: 1.6 => 1.7
* stage: Unreviewed => Accepted


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/23652#comment:3>

Django

unread,
Oct 24, 2014, 8:52:26 AM10/24/14
to django-...@googlegroups.com
#23652: Database name is not reset after destroying test database
--------------------------------------+------------------------------------
Reporter: Bjarkias | Owner: nobody

Type: Bug | Status: new
Component: Testing framework | Version: 1.7
Severity: Normal | Resolution:
Keywords: test destroy_test_db | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by claudep):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/23652#comment:4>

Django

unread,
Oct 24, 2014, 8:57:40 AM10/24/14
to django-...@googlegroups.com
#23652: Database name is not reset after destroying test database
--------------------------------------+------------------------------------
Reporter: Bjarkias | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.7
Severity: Normal | Resolution:
Keywords: test destroy_test_db | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):

* has_patch: 0 => 1


Comment:

https://github.com/django/django/pull/3418

--
Ticket URL: <https://code.djangoproject.com/ticket/23652#comment:5>

Django

unread,
Oct 24, 2014, 10:22:30 AM10/24/14
to django-...@googlegroups.com
#23652: Database name is not reset after destroying test database
-------------------------------------+-------------------------------------
Reporter: Bjarkias | Owner: nobody

Type: Bug | Status: new
Component: Testing framework | Version: 1.7
Severity: Normal | Resolution:
Keywords: test | Triage Stage: Ready for
destroy_test_db | checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/23652#comment:6>

Django

unread,
Oct 24, 2014, 11:06:40 AM10/24/14
to django-...@googlegroups.com
#23652: Database name is not reset after destroying test database
-------------------------------------+-------------------------------------
Reporter: Bjarkias | Owner: nobody
Type: Bug | Status: closed

Component: Testing framework | Version: 1.7
Severity: Normal | Resolution: fixed

Keywords: test | Triage Stage: Ready for
destroy_test_db | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz <claude@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"45db842c9bcd6f9afe274c120f43847657473839"]:
{{{
#!CommitTicketReference repository=""
revision="45db842c9bcd6f9afe274c120f43847657473839"
Fixed #23652 -- Restored database name after destroying test database

Thanks Bjarkias for the report.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23652#comment:7>

Reply all
Reply to author
Forward
0 new messages