From de527c485efb5b15c60a5bbb3fe3636dd7daf70d Mon Sep 17 00:00:00 2001 From: C1-BA-B1-F3 Date: Sat, 3 Oct 2026 16:26:22 +0800 Subject: [PATCH 1/2] test(dblog): clear process-instance table in setUp for test isolation test_db_content asserts the process-instance table is empty, but other tests may have left rows there, making the result order-dependent. Delete all rows in setUp so the test passes whether run alone or after other tests. Fixes #679 --- tests/test_dblog.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_dblog.py b/tests/test_dblog.py index d3707b52b..91b99d2c8 100644 --- a/tests/test_dblog.py +++ b/tests/test_dblog.py @@ -19,6 +19,12 @@ class DBLogTest(TestBase): def setUp(self): super().setUp() self.database = configuration.get_config_value('logging', 'database') + # Ensure a clean slate: other tests may have left rows in the + # process-instance table, which would make the content assertions + # below fail when the suite runs in a different order. + session = get_session() + session.query(ProcessInstance).delete() + session.commit() def test_0_dblog(self): """Test pywps.formats.Format class From fd7de369dc154cc0328794e369f22938a7d22816 Mon Sep 17 00:00:00 2001 From: C1-BA-B1-F3 Date: Sat, 3 Oct 2026 16:47:40 +0800 Subject: [PATCH 2/2] fix(storage): use output identifier when reference filename is 'input' When a ComplexOutput is returned as a reference and its file was inherited from a URL download, the generated URL always contains 'input.' (the default name for downloaded resources). Use the output identifier instead so the reference URL is meaningful to users. Fixes #674 --- pywps/inout/storage/file.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pywps/inout/storage/file.py b/pywps/inout/storage/file.py index 99e04bbdb..447cd0b67 100644 --- a/pywps/inout/storage/file.py +++ b/pywps/inout/storage/file.py @@ -31,6 +31,13 @@ def _build_output_name(output): if not suffix: suffix = output.data_format.extension _, file_name = os.path.split(prefix) + + # Avoid misleading names for outputs: if the file name is the generic + # 'input' (the default used when downloading URL resources), use the + # output identifier instead so the reference URL is meaningful. + if file_name == 'input' and getattr(output, 'identifier', None): + file_name = output.identifier + output_name = file_name + suffix return output_name, suffix