old_contents: """
  This file demonstrates two different styles of tests (one doctest and one
  unittest). These will both pass when you run "manage.py test".
  
  Replace these with more appropriate tests for your application.
  """
  
  from django.test import TestCase
  
  class SimpleTest(TestCase):
      def test_basic_addition(self):
          """
          Tests that 1 + 1 always equals 2.
          """
          self.failUnlessEqual(1 + 1, 2)
  
  __test__ = {"doctest": """
  Another way to test that 1 + 1 is equal to 2.
  
  >>> 1 + 1 == 2
  True
  """}
  
  
new_contents: """
  This file demonstrates two different styles of tests (one doctest and one
  unittest). These will both pass when you run "manage.py test".
  
  Replace these with more appropriate tests for your application.
  """
  
  from django.test import TestCase
  from blog.models import Entry, Category
  from django.contrib.auth.models import User
  from django.contrib.contenttypes.models import ContentType
  
  from datetime import datetime
  
  class EntryTest(TestCase):
      def test_live_entry(self):
          u = User()
          u.username = "testuser"
          u.save()
          c = Category()
          c.slug = "cat"
          c.title = "Cat"
          c.save()
          e = Entry()
          e.title = "test"
          e.slug = "test"
          e.body = "jadda"
          e.category = c
          e.user = u
          e.pub_date = datetime.now()
          e.save()
  
          f = Entry.live.get(title="test")
          self.assertEqual(e, f)
  
  
subject: add a simple entry test with dependencies