From d0ba77a5d4ad139772c2f1842a388d74f7d13f76 Mon Sep 17 00:00:00 2001 From: ai-bot Date: Fri, 9 Oct 2026 09:12:03 +0000 Subject: [PATCH] Section 27: cover the new last column of the export --- tests/test_export.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_export.py b/tests/test_export.py index 201d8a0..87646fe 100644 --- a/tests/test_export.py +++ b/tests/test_export.py @@ -68,6 +68,17 @@ class ExportTests(unittest.TestCase): values = dict(zip(HEADERS, rows[1])) self.assertEqual(values["Contact details confirmed"], value) + def test_the_follow_up_closed_column_is_last_and_reads_back(self): + # The closures that belong to a key are joined into the last column, + # like the security statuses (section 27). + joined = "key_unavailable: rotate (2026-10-05); hardware_failure: replace_hardware (2026-10-06)" + rows = parse(build_csv([{"closed_alerts": joined}])) + values = dict(zip(HEADERS, rows[1])) + + self.assertEqual(HEADERS[-1], "Follow-up closed") + self.assertEqual(dict(COLUMNS)["closed_alerts"], "Follow-up closed") + self.assertEqual(values["Follow-up closed"], joined) + def test_text_with_separators_is_quoted_and_read_back(self): comment = 'note, with "quotes"; and more' rows = parse(build_csv([{"key_comments": comment}]))