'Tests inviting with various missing or invalid parameters.'

def test_missing_or_invalid_params(self):

    self.login(self.example_email('hamlet'))
    self.assert_json_error(self.client_post('/json/invites', {'invitee_emails': 'foo@zulip.com', 'custom_body': ''}), 'You    must    specify    at    least    one    stream    for    invitees    to    join.')
    for address in ('noatsign.com', 'outsideyourdomain@example.net'):
        self.assert_json_error(self.invite(address, ['Denmark']), "Some    emails    did    not    validate,    so    we    didn't    send    any    invitations.")
    self.check_sent_emails([])
    self.assert_json_error(self.invite('', ['Denmark']), 'You    must    specify    at    least    one    email    address.')
    self.check_sent_emails([])
