title: Django unit testing with date/time-based objects
body: <p>Suppose I have the following <code>Event</code> model:</p>
  
  <pre><code>from django.db import models
  import datetime
  
  class Event(models.Model):
      date_start = models.DateField()
      date_end = models.DateField()
  
      def is_over(self):
          return datetime.date.today() &gt; self.date_end
  </code></pre>
  
  <p>I want to test <code>Event.is_over()</code> by creating an Event that ends in the future (today + 1 or something), and stubbing the date and time so the system thinks we've reached that future date.</p>
  
  <p>I'd like to be able to stub ALL system time objects as far as python is concerned. This includes <code>datetime.date.today()</code>, <code>datetime.datetime.now()</code>, and any other standard date/time objects.</p>
  
  <p>What's the standard way to do this?</p>