"""Tests for exception handler. Test endpoint: GET /label/ """ from unittest.mock import patch from backend import handlers # noqa (handlers are imported for test client) @patch('backend.handlers.jsonify', side_effect=Exception()) def test_exception_handler(mock_jsonify, client): """Test an uncaught Exception results in a 500 status code.""" result = client.get('/hello/') assert result.status_code == 500