Ticket #7978: sites_test.diff

File sites_test.diff, 652 bytes (added by evan_schulz, 16 years ago)
  • django/contrib/sites/tests.py

     
    11"""
     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
    29>>> # Make sure that get_current() does not return a deleted Site object.
    3 >>> from django.contrib.sites.models import Site
    410>>> s = Site.objects.get_current()
    511>>> isinstance(s, Site)
    612True
Back to Top