Esempio n. 1
0
 def setUp(self):
     self.super()
     self.task = AgiloTicket(self.env, t_type=Type.TASK)
     # this task is not stored in the db on purpose - so I can check
     # that no workflow does any permanent damage!
     del self.task._old[Key.TYPE]
     req = self.teh.mock_request('foo')
     self.manipulator = TicketStatusManipulator(self.env, req, self.task)
     self.assert_equals({}, self.task._old)
Esempio n. 2
0
 def _simulate_status_change_and_update_request_parameters(
         self, req, args, ticket_id):
     # TicketStatusManipulator will change the ticket and we don't want to pollute
     # the cache
     ticket = self._ticket_without_cache(ticket_id)
     wrapped_request = RequestWrapper(req, args)
     wrapped_request.authname = self._get_username_of_acting_user(
         req, args, ticket)
     manipulator = TicketStatusManipulator(self.env, wrapped_request,
                                           ticket)
     ticket_changed = manipulator.change_status_to(args['simple_status'])
     if ticket_changed:
         for attribute_name in ticket._old:
             args[attribute_name] = ticket[attribute_name]