mirror of
https://github.com/django/django.git
synced 2024-12-26 19:16:11 +00:00
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.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()
|
>>> s = Site.objects.get_current()
|
||||||
>>> isinstance(s, Site)
|
>>> isinstance(s, Site)
|
||||||
True
|
True
|
||||||
|
Loading…
Reference in New Issue
Block a user