#17860 closed Bug (invalid)
Documentation for test utils does not take into account create_test_db move
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | 1.3 |
Severity: | Normal | Keywords: | documentation test create_test_db |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The documentation here - https://docs.djangoproject.com/en/1.3/topics/testing/, at any version, does not take into account the changes made here https://code.djangoproject.com/changeset/8296/django/trunk/django/test/utils.py, which are documented (and hard to find) here - https://code.djangoproject.com/wiki/BackwardsIncompatibleChanges under Refactored the Creation and Introspection modules of the database backends.
Change History (7)
comment:1 by , 13 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:3 by , 12 years ago
I'm unsure exactly what information this ticket is requesting be added. As far as I can tell, most of the wiki notes describe internal API changes.
comment:4 by , 12 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:5 by , 12 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
The link has moved - but the documentation here - https://docs.djangoproject.com/en/1.3/topics/testing/#django.test.utils.create_test_db - is still not correct. The django.test.utils module in version 3 does NOT have a function create_test_db as shown in the document. The function is elsewhere. If it is an "internal API", then perhaps it should not be described in the test utilities section of that page.
Either way - for 1.3 (and presumably later versions if it has not yet changed) that document is wrong.
comment:6 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
You seem to be missing the note that exists in this doc about where these methods now exist. Ramiro noted it above, it is directly above the description of the test_db
methods:
The creation module of the database backend (connection.creation) also provides some utilities that can be useful during testing.
This paragraph was inserted in the same commit which moved these methods to where they currently are (search for testing.txt on https://github.com/django/django/commit/9dc4ba875f).
I don't see that the doc is incorrect here.
comment:7 by , 12 years ago
Ah - I stand corrected - that prefix does show it is in the other module.
create_test_db
anddestroy_test_db
methods are described at the bottom of such document. They are prefixed by this paragraph: