Fixed #16969 -- Don't connect to named database when possible#1788
Closed
claudep wants to merge 1 commit intodjango:masterfrom
Closed
Fixed #16969 -- Don't connect to named database when possible#1788claudep wants to merge 1 commit intodjango:masterfrom
claudep wants to merge 1 commit intodjango:masterfrom
Conversation
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. |
Member
Author
|
Docs updated |
Member
There was a problem hiding this comment.
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.
Thanks Andreas Pelme for the report and initial patch, and Aymeric Augustin, Shai Berger and Tim Graham for the reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks Andreas Pelme for the report and initial patch.