summaryrefslogtreecommitdiff
path: root/django/contrib/sites/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/contrib/sites/tests.py')
-rw-r--r--django/contrib/sites/tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/contrib/sites/tests.py b/django/contrib/sites/tests.py
index 5c38ee1b6d..f39f7a2c82 100644
--- a/django/contrib/sites/tests.py
+++ b/django/contrib/sites/tests.py
@@ -1,6 +1,9 @@
"""
->>> # Make sure that get_current() does not return a deleted Site object.
>>> from django.contrib.sites.models import Site
+>>> from django.conf import settings
+>>> Site(id=settings.SITE_ID, domain="example.com", name="example.com").save()
+
+>>> # Make sure that get_current() does not return a deleted Site object.
>>> s = Site.objects.get_current()
>>> isinstance(s, Site)
True