コード例 #1
0
 def test_workflow_info_page_after_workflow_ui_creation(
         self, selenium, workflow):
     """Test that creation of workflow via UI corrects a correct object."""
     # pylint: disable=invalid-name
     actual_workflow = ui_facade.get_obj(workflow)
     test_utils.set_unknown_attrs_to_none(actual_workflow)
     test_utils.obj_assert(actual_workflow, workflow)
コード例 #2
0
 def test_workflow_info_page_after_workflow_ui_creation(
     self, selenium, workflow
 ):
   """Test that creation of workflow via UI corrects a correct object."""
   # pylint: disable=invalid-name
   actual_workflow = ui_facade.get_obj(workflow)
   test_utils.set_unknown_attrs_to_none(actual_workflow)
   test_utils.obj_assert(actual_workflow, workflow)
コード例 #3
0
 def test_add_comment_to_cycle_task(self, login_as_creator_or_reader,
                                    activated_workflow, selenium):
     """Test adding a comment to the cycle task."""
     cycle_task = cycle_entity_population.create_workflow_cycle(
         activated_workflow).cycle_task_groups[0].cycle_tasks[0]
     comment = entity_factory_common.CommentFactory().create(
         description="comment")
     workflow_ui_facade.add_comment_to_cycle_task(comment=comment,
                                                  cycle_task=cycle_task)
     selenium.refresh()  # reload page to check change is saved
     actual_cycle_task = workflow_ui_facade.get_cycle_task(cycle_task)
     test_utils.set_unknown_attrs_to_none(actual_cycle_task.comments[0])
     test_utils.obj_assert(actual_cycle_task, cycle_task)
コード例 #4
0
 def test_add_comment_to_cycle_task(
     self, login_as_creator_or_reader, activated_workflow, selenium
 ):
   """Test adding a comment to the cycle task."""
   cycle_task = cycle_entity_population.create_workflow_cycle(
       activated_workflow).cycle_task_groups[0].cycle_tasks[0]
   comment = entity_factory_common.CommentFactory().create(
       description="comment")
   workflow_ui_facade.add_comment_to_cycle_task(
       comment=comment, cycle_task=cycle_task)
   selenium.refresh()  # reload page to check change is saved
   actual_cycle_task = workflow_ui_facade.get_cycle_task(cycle_task)
   test_utils.set_unknown_attrs_to_none(actual_cycle_task.comments[0])
   test_utils.obj_assert(actual_cycle_task, cycle_task)
コード例 #5
0
 def test_create_threat(self, selenium, threat):
   """Tests threat creation via UI."""
   actual_treat = ui_facade.get_obj(threat)
   test_utils.set_unknown_attrs_to_none(actual_treat)
   test_utils.obj_assert(actual_treat, threat)