Test multiple routers.
(self)
| 91 | self._test_create_model("test_mltdb_crmo3", should_run=True) |
| 92 | |
| 93 | def test_create_model4(self): |
| 94 | """ |
| 95 | Test multiple routers. |
| 96 | """ |
| 97 | with override_settings(DATABASE_ROUTERS=[AgnosticRouter(), AgnosticRouter()]): |
| 98 | self._test_create_model("test_mltdb_crmo4", should_run=True) |
| 99 | with override_settings( |
| 100 | DATABASE_ROUTERS=[MigrateNothingRouter(), MigrateEverythingRouter()] |
| 101 | ): |
| 102 | self._test_create_model("test_mltdb_crmo4", should_run=False) |
| 103 | with override_settings( |
| 104 | DATABASE_ROUTERS=[MigrateEverythingRouter(), MigrateNothingRouter()] |
| 105 | ): |
| 106 | self._test_create_model("test_mltdb_crmo4", should_run=True) |
| 107 | |
| 108 | def _test_run_sql(self, app_label, should_run, hints=None): |
| 109 | with override_settings(DATABASE_ROUTERS=[MigrateEverythingRouter()]): |
nothing calls this directly
no test coverage detected