def test_should_retun_frequency_period_for_a_given_deadline_when_deadline_frequency_is_week_and_mode_is_following_1( self): deadline = Deadline(frequency=Week(2), mode="Following") self.assertEqual( (date(2011, 9, 5), date(2011, 9, 11)), deadline.get_applicable_frequency_period_for(date(2011, 9, 13)))
def test_should_retun_frequency_period_for_a_given_deadline_when_deadline_frequency_is_month_and_mode_is_following_2( self): deadline = Deadline(frequency=Month(30), mode="Following") self.assertEqual( (date(2011, 7, 1), date(2011, 7, 31)), deadline.get_applicable_frequency_period_for(date(2011, 8, 30)))
def test_should_retun_frequency_period_for_a_given_deadline_when_deadline_frequency_is_week_and_mode_is_that( self): deadline = Deadline(frequency=Week(5), mode="That") self.assertEqual( (date(2011, 9, 12), date(2011, 9, 18)), deadline.get_applicable_frequency_period_for(date(2011, 9, 16)))
def test_should_retun_frequency_period_for_a_given_deadline_when_deadline_frequency_is_month_and_mode_is_that( self): deadline = Deadline(frequency=Month(6), mode="That") self.assertEqual( (date(2011, 9, 1), date(2011, 9, 30)), deadline.get_applicable_frequency_period_for(date(2011, 9, 6)))