From 4bc653b50d3f36bab2bb06dabccf51d73af5453b Mon Sep 17 00:00:00 2001 From: ai-bot Date: Fri, 16 Oct 2026 17:19:06 +0000 Subject: [PATCH] Pin the export link on the history page instead of the dashboard (32.7 point 5) --- tests/test_export_filename.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/test_export_filename.py b/tests/test_export_filename.py index d1ed686..5dc58a5 100644 --- a/tests/test_export_filename.py +++ b/tests/test_export_filename.py @@ -1,6 +1,6 @@ """Tests for the dated CSV export filename (section 31 point 3). -The server names every download with its own date, and the dashboard link leaves +The server names every download with its own date, and the history link leaves the name to the server, because a valued ``download`` attribute would override the ``Content-Disposition`` filename. """ @@ -41,14 +41,19 @@ class ExportFilenameTests(unittest.TestCase): ) self.assertRegex(export_filename(), FILENAME_PATTERN) - def test_the_dashboard_link_does_not_override_the_filename(self): + def test_the_history_link_does_not_override_the_filename(self): # A ``download`` attribute with a value would override the - # ``Content-Disposition`` filename, so the dashboard link must not carry - # one (section 31 point 3). - html = (ROOT / "static" / "index.html").read_text(encoding="utf-8") + # ``Content-Disposition`` filename, so the link must not carry one. The + # link moved from the dashboard to the history page in section 32.7 + # point 5, and the rule moved with it. + html = (ROOT / "static" / "history.html").read_text(encoding="utf-8") self.assertIn('href="/api/export"', html) self.assertNotIn('download="', html) + # The dashboard carries no export link of its own any more. + dashboard = (ROOT / "static" / "index.html").read_text(encoding="utf-8") + + self.assertNotIn("/api/export", dashboard) class ExportFilenameApiTests(SessionMixin, unittest.TestCase):