Code

Opened 3 years ago

Closed 3 years ago

#16037 closed Bug (duplicate)

Multiple databases support for unit testing

Reported by: prudnikov Owned by: nobody
Component: Database layer (models, ORM) Version: 1.3
Severity: Normal Keywords: test, database, fixtures
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX:

Description

I use multiple database functionality. Fixtures that contain data for non-default database are not being loaded when I run ./manage.py tests app. It starts loading when I delete all routers from DATABASE_ROUTERS (all data goes to the 'default' database).

There is no option --database for "test" management command.

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

If I understand correctly, the actual bug is the fact that the loaddata operation performed during the test sequence does not honor the database routers.

comment:2 Changed 3 years ago by julien

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

This feature was already requested in #14610.

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.