'Build a Zendesk ticket that can be used in assertions to verify that the correct
data was submitted to create a Zendesk ticket.'

def _build_zendesk_ticket(self, recipient, name, email, subject, details, tags, custom_fields=None):

    ticket = {'ticket': {'recipient': recipient, 'requester': {'name': name, 'email': email}, 'subject': subject, 'comment': {'body': details}, 'tags': tags}}
    if (custom_fields is not None):
        ticket['ticket']['custom_fields'] = custom_fields
    return ticket
