KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have two databases that my site uses and I have an app that uses both of them. I need to write a TestCase that loads fixtures for both databases. I use a DB router, which works fine in production, but in the testing framework, Django insists on using the 'default' database for all fixtures, even for models that specify the other database. How do I tell Django to run a fixture against another database? My TestCase is defined list: class VerifierTestCase(TestCase): fixtures = ['zipcodes_test.json', 'all_states.json', 'wtf.json'] multi_db = True
Tags (comma-separated)
Save Edits
Cancel