Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

        def update_value(field, value):
    def _update_value(f):
        def __update_value(*args, **kwargs):
            ticket = f(*args, **kwargs)
            ticket[field] = value
            when = kwargs.get('when')
            if when is not None:
                changetime = ticket['changetime']
                if changetime is not None:
                    when = changetime
                when += timedelta(seconds=1)
            assert ticket.save_changes(when=when)
            return ticket
        return __update_value
    return _update_value
        


src/t/r/TracCronPlugin-0.3.1/tests/test_ticket_deadline_task.py   TracCronPlugin(Download)
def _create_tickets(env, date_field_name, date_field):
    from utils import update_value, create_ticket
    env.config.set('ticket-custom', date_field_name, 'text')
 
    @update_value(date_field_name, date_field)