From d34bb7b47fc56b149862bb906d4655e5b5fac414 Mon Sep 17 00:00:00 2001
From: Ansgar Burchardt <ansgar.burchardt@tu-dresden.de>
Date: Wed, 18 Sep 2024 21:20:02 +0200
Subject: [PATCH] add flaky test

---
 app/demo_test.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/app/demo_test.py b/app/demo_test.py
index 3984103..56aef4a 100644
--- a/app/demo_test.py
+++ b/app/demo_test.py
@@ -1,3 +1,4 @@
+import secrets
 import unittest
 
 from fastapi.testclient import TestClient
@@ -36,3 +37,9 @@ class TestGetHello(unittest.TestCase):
 #         response = client.get("/hello", params={"name": "Bernd"})
 #         self.assertEqual(response.status_code, 200)
 #         self.assertEqual(response.json(), "Bye.")
+
+
+class TestFlaky(unittest.TestCase):
+    def test_flaky(self) -> None:
+        choice = secrets.choice([0, 42])
+        self.assertEqual(choice, 42)
-- 
GitLab