'Using a webhook while in a deactivated realm fails'

def test_webhook_deactivated_realm(self):

    do_deactivate_realm(get_realm('zulip'))
    email = self.example_email('hamlet')
    api_key = self.get_api_key(email)
    url = ('/api/v1/external/jira?api_key=%s&stream=jira_custom' % (api_key,))
    data = self.fixture_data('jira', 'created_v2')
    result = self.client_post(url, data, content_type='application/json')
    self.assert_json_error_contains(result, 'has    been    deactivated', status_code=400)
