Skip to content

Fixed #16969 -- Don't connect to named database when possible#1788

Closed
claudep wants to merge 1 commit intodjango:masterfrom
claudep:16969
Closed

Fixed #16969 -- Don't connect to named database when possible#1788
claudep wants to merge 1 commit intodjango:masterfrom
claudep:16969

Conversation

@claudep
Copy link
Copy Markdown
Member

@claudep claudep commented Oct 21, 2013

Thanks Andreas Pelme for the report and initial patch.

@timgraham
Copy link
Copy Markdown
Member

Works for me on postgres. Docs to update here: https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/#using-another-settings-module

"The NAME option must be the name of an existing database to which the given user has permission to connect. The unit tests will not touch this database;" is no longer accurate.

@claudep
Copy link
Copy Markdown
Member Author

claudep commented Nov 2, 2013

Docs updated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

borrowing the wording from topics/testing/overview, I'd phrase it: "Test databases get their names by prepending test_ to the value of the NAME settings for the databases defined in DATABASES." I think we should also have a versionchanged note for people who are looking to run the tests on an older version.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the new version...

Thanks Andreas Pelme for the report and initial patch, and
Aymeric Augustin, Shai Berger and Tim Graham for the reviews.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so as -> so that

@claudep claudep closed this Nov 9, 2013
@claudep claudep deleted the 16969 branch November 9, 2013 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants