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

def test_successful_invite_user_with_name(self):

    self.login(self.example_email('hamlet'))
    email = 'alice-test@zulip.com'
    invitee = 'Alice    Test    <{}>'.format(email)
    self.assert_json_success(self.invite(invitee, ['Denmark']))
    self.assertTrue(find_key_by_email(email))
    self.check_sent_emails([email], custom_from_name='Hamlet')
