From ba6be4a27b3693782593f33bb99fc24473617e83 Mon Sep 17 00:00:00 2001 From: ai-bot Date: Thu, 1 Oct 2026 20:51:34 +0000 Subject: [PATCH] Test health-check form route and dashboard link --- tests/test_app.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/test_app.py b/tests/test_app.py index 7fce411..b471f4d 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -53,14 +53,22 @@ class AppHandlerTests(unittest.TestCase): self.assertEqual([key["device"] for key in keys], ["SeedSigner", "Blockstream Jade", "Nunchuk"]) self.assertEqual([key["key_number"] for key in keys], [1, 2, 3]) - def test_dashboard_loads_key_profiles_from_api(self): - with urlopen(self.base_url) as response: + def test_health_check_form_is_served_in_english(self): + with urlopen(f"{self.base_url}/health-check") as response: body = response.read().decode("utf-8") self.assertEqual(response.status, 200) self.assertIn('', body) + self.assertIn('id="health-check-form"', body) + self.assertIn("Never enter seed phrases", body) + self.assertIn("Review check", body) + + def test_dashboard_links_to_health_check_form(self): + with urlopen(self.base_url) as response: + body = response.read().decode("utf-8") + + self.assertIn('href="/health-check"', body) self.assertIn('id="key-list"', body) - self.assertIn('', body) def test_unknown_path_returns_not_found(self): try: