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

def test_successful_invite_user(self):

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