def ticket(self): ticket_id = self.request.route_kwargs.get('ticket_id') if not ticket_id: ticket_id = self.request.get('ticket_id') return Ticket.get_by_id(int(ticket_id), parent = self.event_key) if ticket_id else None
def setUp(self): super(TestTicket, self).setUp() ticket = Ticket(**ticket_properties) self.ticket = ticket.put()