From 10d1201799a49e809dee07715c33bd6d5aafcbdb Mon Sep 17 00:00:00 2001
From: cyroxx
Date: Tue, 3 Feb 2026 01:12:06 +0100
Subject: [PATCH] add initial test cases for status page functionality
---
.vscode/settings.json | 7 +
pytest.ini | 5 +
sample_html/status_in_produktion.html | 1937 +++++++++++++++++++++++++
tests/test_statuspage.py | 23 +
4 files changed, 1972 insertions(+)
create mode 100644 .vscode/settings.json
create mode 100644 pytest.ini
create mode 100644 sample_html/status_in_produktion.html
create mode 100644 tests/test_statuspage.py
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..9b38853
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,7 @@
+{
+ "python.testing.pytestArgs": [
+ "tests"
+ ],
+ "python.testing.unittestEnabled": false,
+ "python.testing.pytestEnabled": true
+}
\ No newline at end of file
diff --git a/pytest.ini b/pytest.ini
new file mode 100644
index 0000000..0d2f867
--- /dev/null
+++ b/pytest.ini
@@ -0,0 +1,5 @@
+[pytest]
+minversion = 7.0
+addopts = -ra
+testpaths = tests
+python_files = test_*.py
\ No newline at end of file
diff --git a/sample_html/status_in_produktion.html b/sample_html/status_in_produktion.html
new file mode 100644
index 0000000..dc37ea4
--- /dev/null
+++ b/sample_html/status_in_produktion.html
@@ -0,0 +1,1937 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OLAV 25.11.01-331 - Online Anträge und Vorgänge - Statusabfrage hoheitlicher Dokumente
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Online Dienstleistungen Bürgerservice
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Sprunglinks:
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
Benutzerinfo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Schnellzugriffe:
A A ASchriftgröße
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Navigation
+
Sie sind hier:- Statusabfrage hoheitlicher Dokumente
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Statusabfrage hoheitlicher Dokumente
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Anfrage
+Sie sind hier: Ergebnis
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (*) sind Pflichtfelder
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/test_statuspage.py b/tests/test_statuspage.py
new file mode 100644
index 0000000..ef22df8
--- /dev/null
+++ b/tests/test_statuspage.py
@@ -0,0 +1,23 @@
+from datetime import datetime
+
+from main import is_status_page, parse_status_page, normalize_status_text
+
+SAMPLE_HTML = "sample_html/status_in_produktion.html"
+
+
+def test_is_status_page_positive():
+ with open(SAMPLE_HTML, encoding="utf-8") as fh:
+ html = fh.read()
+
+ assert is_status_page(html) is True
+
+
+def test_parse_status_page_positive():
+ with open(SAMPLE_HTML, encoding="utf-8") as fh:
+ html = fh.read()
+
+ status_raw, timestamp = parse_status_page(html)
+ status = normalize_status_text(status_raw)
+
+ assert status == "noch in Produktion"
+ assert timestamp == datetime(2026, 2, 2, 16, 0, 0)
\ No newline at end of file