예제 #1
0
파일: tests.py 프로젝트: sfowl/fowllanguage
 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)
예제 #2
0
파일: tests.py 프로젝트: sfowl/fowllanguage
 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)