Opened 8 years ago

Closed 8 years ago

#16037 closed Bug (duplicate)

Multiple databases support for unit testing

Reported by: Vladimir 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: no


I use multiple database functionality. Fixtures that contain data for non-default database are not being loaded when I run ./ 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.

Change History (2)

comment:1 Changed 8 years ago by Aymeric Augustin

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 8 years ago by Julien Phalip

Resolution: duplicate
Status: newclosed

This feature was already requested in #14610.

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