Exemplo n.º 1
0
 def testSaveBacklogCommand(self):
     """Tests the saving backlog command"""
     sprint = self.teh.create_sprint('MyChaningSprint')
     backlog = self.teh.create_backlog(
         'ChangingBacklog',
         ticket_types=[Type.USER_STORY, Type.TASK],
         b_type=BacklogType.SPRINT,
         scope=sprint.name,
         num_of_items=20)
     self.assert_length(20, backlog)
     # now remove some of the items and save
     backlog.remove(backlog[0])
     backlog.remove(backlog[1])
     self.assert_length(18, backlog)
     # now save it and reload it
     cmd_save_backlog = BacklogController.SaveBacklogCommand(
         self.env, name='ChangingBacklog', scope=sprint.name)
     self.controller.process_command(cmd_save_backlog)
     # now reload the backlog and check the two items have been removed
     cmd_get_backlog = BacklogController.GetBacklogCommand(
         self.env, name='ChangingBacklog', scope=sprint.name)
     backlog = self.controller.process_command(cmd_get_backlog)
     self.assert_length(18, backlog)