summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/sites_tests/tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/sites_tests/tests.py b/tests/sites_tests/tests.py
index 9b409fd0b5..128420a17b 100644
--- a/tests/sites_tests/tests.py
+++ b/tests/sites_tests/tests.py
@@ -209,6 +209,15 @@ class CreateDefaultSiteTests(TestCase):
create_default_site(self.app_config, verbosity=0)
self.assertEqual(Site.objects.get().pk, 35696)
+ @override_settings() # Restore original ``SITE_ID`` afterwards.
+ def test_no_site_id(self):
+ """
+ #24488 - The pk should default to 1 if no ``SITE_ID`` is configured.
+ """
+ del settings.SITE_ID
+ create_default_site(self.app_config, verbosity=0)
+ self.assertEqual(Site.objects.get().pk, 1)
+
class MiddlewareTest(TestCase):