Code

Opened 3 years ago

Closed 6 months ago

Last modified 6 months ago

#15582 closed Bug (fixed)

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

Reported by: slinkp 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 timo 6 months ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 3 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 3 years ago by lukeplant

  • Type set to Bug

comment:3 Changed 3 years ago by lukeplant

  • Severity set to Normal

comment:4 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:5 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

Changed 6 months ago by timo

comment:6 Changed 6 months ago by timo

  • Has patch set

comment:7 Changed 6 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

In dd839a2dfd6a30474a2b367a4b3ce70b26c3f318:

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

Thanks slinkp for the suggestion.

comment:8 Changed 6 months 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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.