test-reporting 4.4.0__tar.gz → 4.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {test_reporting-4.4.0 → test_reporting-4.4.1}/PKG-INFO +1 -1
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/monthly_ui.py +9 -1
- {test_reporting-4.4.0 → test_reporting-4.4.1}/setup.py +1 -1
- {test_reporting-4.4.0 → test_reporting-4.4.1}/test_reporting.egg-info/PKG-INFO +1 -1
- {test_reporting-4.4.0 → test_reporting-4.4.1}/tests/test_published_monthly_report.py +3 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/LICENSE +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/README.md +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/__init__.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/classifier.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/cli.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/config.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/exporters/__init__.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/exporters/pdf_exporter.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/exporters/pptx_exporter.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/exporters/xlsx_exporter.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/monthly_report.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/pdf_analysis.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/plugin.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/publisher.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/report_insights.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/run_source.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/storage.py +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/templates/index.html +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/templates/project.html +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/reporting/templates/run.html +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/setup.cfg +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/test_reporting.egg-info/SOURCES.txt +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/test_reporting.egg-info/dependency_links.txt +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/test_reporting.egg-info/entry_points.txt +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/test_reporting.egg-info/requires.txt +0 -0
- {test_reporting-4.4.0 → test_reporting-4.4.1}/test_reporting.egg-info/top_level.txt +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import html
|
|
4
4
|
import io
|
|
5
5
|
import json
|
|
6
|
+
import re
|
|
6
7
|
import tempfile
|
|
7
8
|
import webbrowser
|
|
8
9
|
import zipfile
|
|
@@ -119,6 +120,12 @@ endInput.addEventListener('change', chooseCustom);
|
|
|
119
120
|
</main></body></html>'''.encode('utf-8')
|
|
120
121
|
|
|
121
122
|
|
|
123
|
+
def _download_name(project, start, end):
|
|
124
|
+
"""Build a safe, recognizable ZIP name for the browser download."""
|
|
125
|
+
project_part = re.sub(r'[^A-Za-z0-9._-]+', '-', project).strip('.-')[:60] or 'project'
|
|
126
|
+
return f'Test_Report_{project_part}_{start}_to_{end}.zip'
|
|
127
|
+
|
|
128
|
+
|
|
122
129
|
def make_handler(config, run_source=None):
|
|
123
130
|
source = run_source or PublishedRunSource(config)
|
|
124
131
|
|
|
@@ -179,7 +186,8 @@ def make_handler(config, run_source=None):
|
|
|
179
186
|
body = output.getvalue()
|
|
180
187
|
self.send_response(200)
|
|
181
188
|
self.send_header('Content-Type', 'application/zip')
|
|
182
|
-
self.send_header('Content-Disposition',
|
|
189
|
+
self.send_header('Content-Disposition',
|
|
190
|
+
f'attachment; filename="{_download_name(project, start, end)}"')
|
|
183
191
|
self.send_header('Content-Length', str(len(body)))
|
|
184
192
|
self.send_header('X-Content-Type-Options', 'nosniff')
|
|
185
193
|
self.end_headers()
|
|
@@ -9,7 +9,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
9
9
|
|
|
10
10
|
setup(
|
|
11
11
|
name='test-reporting',
|
|
12
|
-
version='4.4.
|
|
12
|
+
version='4.4.1',
|
|
13
13
|
description='Multi-project test reporting dashboard — collect results locally or push to S3',
|
|
14
14
|
long_description=long_description,
|
|
15
15
|
long_description_content_type="text/markdown",
|
|
@@ -170,6 +170,9 @@ class PublishedMonthlyReportTests(unittest.TestCase):
|
|
|
170
170
|
'end': '2026-10-01', 'format': 'xlsx'}).encode()
|
|
171
171
|
with urllib.request.urlopen(address + '/generate', data=good_form) as response:
|
|
172
172
|
self.assertEqual(response.headers.get_content_type(), 'application/zip')
|
|
173
|
+
self.assertEqual(
|
|
174
|
+
response.headers['Content-Disposition'],
|
|
175
|
+
'attachment; filename="Test_Report_Project-A_2026-10-01_to_2026-10-01.zip"')
|
|
173
176
|
with zipfile.ZipFile(io.BytesIO(response.read())) as archive:
|
|
174
177
|
self.assertEqual(len(archive.namelist()), 1)
|
|
175
178
|
self.assertTrue(archive.namelist()[0].endswith('.xlsx'))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|