Commit f423dde3 authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

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

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
parent 99e34c18
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
"""
>>> # 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