Querysets obey the router for db suggestions
(self)
| 1388 | databases = {"default", "other"} |
| 1389 | |
| 1390 | def test_db_selection(self): |
| 1391 | "Querysets obey the router for db suggestions" |
| 1392 | self.assertEqual(Book.objects.db, "other") |
| 1393 | self.assertEqual(Book.objects.all().db, "other") |
| 1394 | |
| 1395 | self.assertEqual(Book.objects.using("default").db, "default") |
| 1396 | |
| 1397 | self.assertEqual(Book.objects.db_manager("default").db, "default") |
| 1398 | self.assertEqual(Book.objects.db_manager("default").all().db, "default") |
| 1399 | |
| 1400 | def test_migrate_selection(self): |
| 1401 | "Synchronization behavior is predictable" |
nothing calls this directly
no test coverage detected