Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#17860 closed Bug (invalid)

Documentation for test utils does not take into account create_test_db move

Reported by: danny@… 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 Ramiro Morales, 12 years ago

Triage Stage: UnreviewedDesign decision needed

create_test_db and destroy_test_db methods are described at the bottom of such document. They are prefixed by this paragraph:

The creation module of the database backend (connection.creation) also provides some utilities that can be useful during testing.

comment:2 by Andy McKay, 12 years ago

Does cleaning up the docs really require a design decision?

comment:3 by Tim Graham, 11 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 Ramiro Morales, 11 years ago

Resolution: worksforme
Status: newclosed

comment:5 by danny@…, 11 years ago

Resolution: worksforme
Status: closedreopened

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 Karen Tracey, 11 years ago

Resolution: invalid
Status: reopenedclosed

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 danny@…, 11 years ago

Ah - I stand corrected - that prefix does show it is in the other module.

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