mirror of https://github.com/django/django.git
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
This commit is contained in:
parent
99e34c1846
commit
f423dde34a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue