From 01ac631e82fe9f1a1d91e9027d8fe03ade39bdf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20B=C3=ADro?= Date: Sun, 9 Jul 2023 14:10:47 +0200 Subject: [PATCH 1/2] Replace the emoji in an error message --- web/src/page_tracker/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/page_tracker/app.py b/web/src/page_tracker/app.py index 50503f2..7ef6182 100644 --- a/web/src/page_tracker/app.py +++ b/web/src/page_tracker/app.py @@ -13,7 +13,7 @@ def index(): page_views = redis().incr("page_views") except RedisError: app.logger.exception("Redis error") # pylint: disable=E1101 - return "Sorry, something went wrong \N{pensive face}", 500 + return "Sorry, something went wrong \N{thinking face}", 500 else: return f"This page has been seen {page_views} times." From 4f295ba4c808a607edd555b32af92cb77530b544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20B=C3=ADro?= Date: Sun, 9 Jul 2023 14:18:25 +0200 Subject: [PATCH 2/2] Fix the failing unit test --- web/test/unit/test_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/test/unit/test_app.py b/web/test/unit/test_app.py index 6efc5f3..7d141d8 100644 --- a/web/test/unit/test_app.py +++ b/web/test/unit/test_app.py @@ -27,4 +27,4 @@ def test_should_handle_redis_connection_error(mock_redis, http_client): # Then assert response.status_code == 500 - assert response.text == "Sorry, something went wrong \N{pensive face}" + assert response.text == "Sorry, something went wrong \N{thinking face}"