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