Пример #1
0
def get_tickets_for_record(endpoint, pid_value):
    """View to get rt ticket belongs to given record"""
    tickets_for_record = tickets.get_tickets_by_recid(pid_value)
    simplified_tickets = [
        _simplify_ticket_response(ticket) for ticket in tickets_for_record
    ]
    return jsonify(simplified_tickets)
Пример #2
0
def test_tickets_are_deserialized_to_str(inspire_app):
    tickets = get_tickets_by_recid("1839571")
    simplified_tickets = [
        _simplify_ticket_response(ticket) for ticket in tickets
    ]
    # Check that this won't fail anymore
    jsonify(simplified_tickets)