MCPcopy
hub / github.com/django/django / test_multi_db_with_router

Method test_multi_db_with_router

tests/sites_tests/tests.py:295–302  ·  view source on GitHub ↗

#16353, #16828 - The default site creation should respect db routing.

(self)

Source from the content-addressed store, hash-verified

293
294 @override_settings(DATABASE_ROUTERS=[JustOtherRouter()])
295 def test_multi_db_with_router(self):
296 """
297 #16353, #16828 - The default site creation should respect db routing.
298 """
299 create_default_site(self.app_config, using="default", verbosity=0)
300 create_default_site(self.app_config, using="other", verbosity=0)
301 self.assertFalse(Site.objects.using("default").exists())
302 self.assertTrue(Site.objects.using("other").exists())
303
304 def test_multi_db(self):
305 create_default_site(self.app_config, using="default", verbosity=0)

Callers

nothing calls this directly

Calls 3

create_default_siteFunction · 0.90
existsMethod · 0.45
usingMethod · 0.45

Tested by

no test coverage detected