summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2008-07-31 09:24:16 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2008-07-31 09:24:16 +0000
commitf423dde34aa0e97dd6ae3a79d4b8f7e4991fb0a2 (patch)
treed613c059e1ba8cc7469f88fa622fda3273601b77
parent99e34c184692c98489f3d3f6ca257d0e87f0e7ab (diff)
Fixed #7978 -- Modified the contrib.sites tests to guarantee the initial conditions of the test match meet the requirements of the test. Thanks to Evan Schulz for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-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