Opened 6 years ago

Closed 3 years ago

Last modified 3 years ago

#15582 closed Bug (fixed)

Docs don't mention that TestCase.multi_db affects test fixtures

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

Description

From reading http://docs.djangoproject.com/en/1.2/topics/testing/#django.test.TestCase.fixtures
I wouldn't guess that you have to do anything special to load fixtures in multi-database setups.

And http://docs.djangoproject.com/en/1.2/topics/testing/#django.test.TestCase.multi_db
says nothing about fixtures. A strict reading would make me think multi_db only affects cleaning databases and maybe loading initial_data fixtures; it doesn't say that it affects loading the fixtures from TestCase.fixtures.

Perhaps that's implied, but I think it should be explicit.

This is especially confusing because there is no output from the test runner at all about fixture loading, either success or failure.

Attachments (1)

15582.diff (1.1 KB) - added by Tim Graham 3 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 6 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

comment:2 Changed 6 years ago by Luke Plant

Type: Bug

comment:3 Changed 6 years ago by Luke Plant

Severity: Normal

comment:4 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:5 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

Changed 3 years ago by Tim Graham

Attachment: 15582.diff added

comment:6 Changed 3 years ago by Tim Graham

Has patch: set

comment:7 Changed 3 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In dd839a2dfd6a30474a2b367a4b3ce70b26c3f318:

Fixed #15582 -- Documented how TransactionTestCase.multi_db affects fixtures.

Thanks slinkp for the suggestion.

comment:8 Changed 3 years ago by Tim Graham <timograham@…>

In 8f5d3d16cb331915e397821efd6faf2700b2bc50:

[1.6.x] Fixed #15582 -- Documented how TransactionTestCase.multi_db affects fixtures.

Thanks slinkp for the suggestion.

Backport of dd839a2dfd from master

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