Exemplo n.º 1
0
 def test_is_upcoming_with_past_date(self):
     """
     is_upcoming() should return false if the date is in the past.
     """
     time = timezone.now() + datetime.timedelta(days=-30)
     upcoming_event = Event(event_date=time)
     self.assertEqual(upcoming_event.is_upcoming(), False)
Exemplo n.º 2
0
 def test_is_upcoming_with_future_date(self):
     """
     is_upcoming() should return true if the date is in the future.
     """
     time = timezone.now() + datetime.timedelta(days=30)
     upcoming_event = Event(event_date=time)
     self.assertEqual(upcoming_event.is_upcoming(), True)