Ticket #7978: sites_test.diff
File sites_test.diff, 652 bytes (added by , 16 years ago) |
---|
-
django/contrib/sites/tests.py
1 1 """ 2 3 >>> from django.contrib.sites.models import Site 4 >>> from django.conf import settings 5 >>> Site.objects.all().delete() 6 >>> Site.objects.create(id=settings.SITE_ID, domain="example.com", name="example.com") 7 <Site: example.com> 8 2 9 >>> # Make sure that get_current() does not return a deleted Site object. 3 >>> from django.contrib.sites.models import Site4 10 >>> s = Site.objects.get_current() 5 11 >>> isinstance(s, Site) 6 12 True