'A call to /json/invites with valid parameters causes an invitation
email to be sent.'

def test_successful_invite_user_with_custom_body(self):

    self.login(self.example_email('hamlet'))
    invitee = 'alice-test@zulip.com'
    body = 'Custom    Text.'
    self.assert_json_success(self.invite(invitee, ['Denmark'], body))
    self.assertTrue(find_pattern_in_email(invitee, body))
    self.check_sent_emails([invitee], custom_body=body, custom_from_name='Hamlet')
