equal
deleted
inserted
replaced
502 try: |
502 try: |
503 aff = cu.execute('Any X WHERE X ref "ARCT01"').get_entity(0, 0) |
503 aff = cu.execute('Any X WHERE X ref "ARCT01"').get_entity(0, 0) |
504 aff.fire_transition('abort') |
504 aff.fire_transition('abort') |
505 cnx.commit() |
505 cnx.commit() |
506 # though changing a user state (even logged user) is reserved to managers |
506 # though changing a user state (even logged user) is reserved to managers |
507 user = cnx.user(self.current_session()) |
507 user = cnx.user(self.session) |
508 # XXX wether it should raise Unauthorized or ValidationError is not clear |
508 # XXX wether it should raise Unauthorized or ValidationError is not clear |
509 # the best would probably ValidationError if the transition doesn't exist |
509 # the best would probably ValidationError if the transition doesn't exist |
510 # from the current state but Unauthorized if it exists but user can't pass it |
510 # from the current state but Unauthorized if it exists but user can't pass it |
511 self.assertRaises(ValidationError, user.fire_transition, 'deactivate') |
511 self.assertRaises(ValidationError, user.fire_transition, 'deactivate') |
512 finally: |
512 finally: |