Opened 14 years ago

Closed 14 years ago

#12204 closed (fixed)

Documentation is not clear on naming/loading of test fixtures

Reported by: Art Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Documentation (http://docs.djangoproject.com/en/dev/topics/testing/#fixture-loading) does not provide any hints on the mechanism of fixture loading.

For instance, it does not explicitly say that all fixtures from all applications matching the names given in instance's 'fixtures' field are loaded, somewhat similar to template resolution mechanism.

While this behaviour is perfectly inline with django's philosophy, it is worth mentioning this particular issues in the documentation.

Thanks

Change History (4)

comment:1 by Russell Keith-Magee, 14 years ago

Resolution: wontfix
Status: newclosed

The documentation you refer to includes the following text:

"Then, all the named fixtures are installed. In this example, Django will install any JSON fixture named mammals, followed by any fixture named birds. See the loaddata documentation for more details on defining and installing fixtures."

The loaddata documentation describes in detail the fixture loading process.

comment:2 by Art, 14 years ago

Resolution: wontfix
Status: closedreopened

Loaddata does describe it indeed, though there is no direct link to it, just mentioning. Should be a href.

Also, imho, this particular issue also deserves to be briefly mentioned on this page as well, so people assigning same names to fixtures and then wondering why they getting all sorts of weird errors.

comment:3 by Russell Keith-Magee, 14 years ago

Triage Stage: UnreviewedAccepted

Let this be a lesson in actually looking at the rendered output - I looked at the documentation source, and it *is* marked up as a link. Unfortunately, the other end of the link isn't defined. I'll commit a fix soon.

As for whether the issue should be raised - I disagree. We direct people to the documentation that describes exactly how fixtures are loaded; we can't compensate for the fact that people don't read documentation by duplicating documentation.

comment:4 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: reopenedclosed

(In [11734]) Fixed #12204 -- Corrected the use of :djadmin: links in the testing docs, plus updated a lot of old-style markup in the django-admin docs. Thanks to Art_S for the report.

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