Opened 5 years ago

Closed 5 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:


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 5 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 5 years ago by julien

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

This feature was already requested in #14610.

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