Beispiel #1
0
 def test_calc_one_time_dates(self, expected, setup_date):
     """Calculate one time dates for {1}."""
     with patch(u"ggrc.access_control.role.get_ac_roles_for",
                return_value={}):
         self.assertEqual(
             expected,
             workflow.Workflow().calc_next_adjusted_date(setup_date))
Beispiel #2
0
 def test_calc_repeated_dates(self, expected, setup_date, repeat_every,
                              unit):
     self.assertEqual(
         expected,
         workflow.Workflow(
             repeat_every=repeat_every, unit=unit,
             repeat_multiplier=1).calc_next_adjusted_date(setup_date))
Beispiel #3
0
 def test_calc_repeated_dates(self, expected, setup_date, repeat_every,
                              unit):
     """Test calculate repeated dates for repeat every {2} {3}."""
     self.assertEqual(
         expected,
         workflow.Workflow(
             repeat_every=repeat_every, unit=unit,
             repeat_multiplier=1).calc_next_adjusted_date(setup_date))
Beispiel #4
0
 def test_calc_repeated_dates(self, expected, setup_date, repeat_every,
                              unit):
     """Test calculate repeated dates for repeat every {2} {3}."""
     with patch(u"ggrc.access_control.role.get_ac_roles_for",
                return_value={}):
         self.assertEqual(
             expected,
             workflow.Workflow(
                 repeat_every=repeat_every, unit=unit,
                 repeat_multiplier=1).calc_next_adjusted_date(setup_date))
Beispiel #5
0
 def test_calc_one_time_dates(self, expected, setup_date):
     self.assertEqual(
         expected,
         workflow.Workflow().calc_next_adjusted_date(setup_date))
Beispiel #6
0
 def test_calc_one_time_dates(self, expected, setup_date):
     """Calculate one time dates for {1}."""
     self.assertEqual(
         expected,
         workflow.Workflow().calc_next_adjusted_date(setup_date))