コード例 #1
0
 def _default_attrs(self):
     """See superclass."""
     start_date = date_utils.first_not_weekend_day(datetime.date.today())
     return {
         "title": self._obj_title,
         "assignees": [users.current_person()],
         "start_date": start_date,
         "due_date": start_date + datetime.timedelta(days=14)
     }
コード例 #2
0
 def _default_attrs(self):
   """See superclass."""
   start_date = date_utils.first_not_weekend_day(datetime.date.today())
   return {
       "title": self._obj_title,
       "assignees": [users.current_person()],
       "start_date": start_date,
       "due_date": start_date + datetime.timedelta(days=14)
   }
コード例 #3
0
 def test_default_values_in_create_task_popup(self, app_workflow,
                                              app_task_group, selenium):
     """Test expected default values in Create Task popup."""
     # pylint: disable=invalid-name
     workflow_ui_facade.open_create_task_group_task_popup(app_task_group)
     task_modal = object_modal.get_modal_obj("task_group_task")
     actual_start_date = ui_dict_convert.str_to_date(
         task_modal.get_start_date())
     actual_due_date = ui_dict_convert.str_to_date(
         task_modal.get_due_date())
     assert actual_start_date == date_utils.first_not_weekend_day(
         datetime.date.today())
     assert actual_due_date == actual_start_date + datetime.timedelta(
         days=7)
コード例 #4
0
 def test_default_values_in_create_task_popup(
     self, app_workflow, app_task_group, selenium
 ):
   """Test expected default values in Create Task popup."""
   # pylint: disable=invalid-name
   workflow_ui_facade.open_create_task_group_task_popup(app_task_group)
   task_modal = object_modal.get_modal_obj("task_group_task")
   actual_start_date = ui_dict_convert.str_to_date(
       task_modal.get_start_date())
   actual_due_date = ui_dict_convert.str_to_date(
       task_modal.get_due_date())
   assert actual_start_date == date_utils.first_not_weekend_day(
       datetime.date.today())
   assert actual_due_date == actual_start_date + datetime.timedelta(days=7)