Beispiel #1
0
 def test_should_return_current_deadline_date_for_this_week_for_that_deadline(
         self):
     deadline = Deadline(frequency=Week(6), mode="That")
     self.assertEqual(date(2011, 9, 17), deadline.current(date(2011, 9,
                                                               15)))
Beispiel #2
0
 def test_should_return_current_deadline_date_for_this_week_for_following_deadline_for_today_on_deadline(
         self):
     deadline = Deadline(frequency=Week(6), mode="Following")
     self.assertEqual(date(2011, 9, 17), deadline.current(date(2011, 9,
                                                               17)))
Beispiel #3
0
 def test_should_return_current_deadline_date_for_that_month_and_asof_post_deadline_day(
         self):
     deadline = Deadline(frequency=Month(6), mode="That")
     self.assertEqual(date(2011, 9, 6), deadline.current(date(2011, 9, 18)))
Beispiel #4
0
 def test_should_return_current_deadline_date_for_following_month_and_asof_as_deadline_day(
         self):
     deadline = Deadline(frequency=Month(6), mode="Following")
     self.assertEqual(date(2011, 9, 6), deadline.current(date(2011, 9, 6)))
Beispiel #5
0
 def test_should_return_current_deadline_date_for_following_week_and_asof_post_deadline_day(
         self):
     deadline = Deadline(frequency=Week(6), mode="Following")
     self.assertEqual(date(2011, 9, 17), deadline.current(date(2011, 9,
                                                               18)))
Beispiel #6
0
 def test_should_return_current_deadline_date_for_this_week_for_that_deadline_for_day3_for_deadline_on_different_day(
         self):
     deadline = Deadline(frequency=Week(3), mode="That")
     self.assertEqual(date(2011, 9, 21), deadline.current(date(2011, 9,
                                                               19)))