Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #7978 -- Modified the contrib.sites tests to guarantee the init…

…ial 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
  • Loading branch information...
commit f423dde34aa0e97dd6ae3a79d4b8f7e4991fb0a2 1 parent 99e34c1
Russell Keith-Magee freakboy3742 authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/contrib/sites/tests.py
5 django/contrib/sites/tests.py
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.