From 9676261852453d66d627bd228c6ff86bb878b972 Mon Sep 17 00:00:00 2001 From: Jules van Rie Date: Tue, 18 Mar 2025 09:59:49 +0100 Subject: [PATCH 1/2] makefile --- Makefile | 7 +++++++ tests/test_api_root.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1a00479..8ecd87f 100644 --- a/Makefile +++ b/Makefile @@ -5,3 +5,10 @@ pylint: pytest: PYTHONDONTWRITEBYTECODE=1 pytest -v --color=yes + + +docker_build: + docker build -t $(IMAGE_URI) . + +docker_run: + docker run -it -e PORT=8000 -p 8080:8000 $(IMAGE_URI) diff --git a/tests/test_api_root.py b/tests/test_api_root.py index 87bc7b3..8d48e6b 100644 --- a/tests/test_api_root.py +++ b/tests/test_api_root.py @@ -6,7 +6,7 @@ class TestApiRoot(unittest.TestCase): def test_api_root(self): - # Adding a 15s sleep timer to ensure + # Adding a 15s sleep timer to ensure # that the container has time to start up time.sleep(15) From c394e89d299ecc5af004d310f38c9acb82ff9438 Mon Sep 17 00:00:00 2001 From: Jules van Rie Date: Tue, 18 Mar 2025 10:07:51 +0100 Subject: [PATCH 2/2] French greeting --- api/fast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/fast.py b/api/fast.py index dc3b65e..306c701 100644 --- a/api/fast.py +++ b/api/fast.py @@ -16,7 +16,7 @@ @app.get('/') def root(): response = { - 'greeting': 'Servus, griaß di!', # This is a typical Bavarian greeting ;) + 'greeting': 'Bonjour à tous et à toutes!', # This is a typical French greeting ;) 'timestamp': datetime.now() }