@@ -307,7 +307,7 @@ def test_describe_process_single_revision(self, process_revision):
307
307
([(0 , "1.3.2" ), (1 , "1.3.2" ), (0 , "1.3.4" ), (1 , "2.0.0" )], ),
308
308
# ensure optional tag returns both variants as pseudo-duplicates when the corresponding revision is also given
309
309
# ("" == "2.0.0"), this is not the same as 'test_describe_process_multi_revision_duplicates' use case
310
- ([(0 , "1.2.5" ), (0 , "" ), (0 , "2.0.0" ), (0 , "" ), (1 , "2.0.0" )], ),
310
+ ([(0 , "1.2.5" ), (0 , "" ), (0 , "2.0.0" ), (1 , "" ), (1 , "2.0.0" )], ),
311
311
])
312
312
def test_describe_process_multi_revision_filter (self , process_revisions ):
313
313
headers = {"Accept" : ContentType .APP_XML }
@@ -316,8 +316,8 @@ def test_describe_process_multi_revision_filter(self, process_revisions):
316
316
for idx , rev in process_revisions
317
317
]
318
318
proc_vers = [
319
- rev if rev else self .process_revisions [0 ][- 1 ]
320
- for rev in process_revisions
319
+ rev if rev else self .process_revisions [idx ][- 1 ]
320
+ for idx , rev in process_revisions
321
321
]
322
322
params = {
323
323
"service" : "WPS" ,
@@ -333,15 +333,16 @@ def test_describe_process_multi_revision_filter(self, process_revisions):
333
333
resp .mustcontain (f"ProcessDescription wps:processVersion=\" { proc_ver } \" " ) # reported regardless of ID:rev
334
334
resp .mustcontain (f"<ows:Identifier>{ proc_id } </ows:Identifier>" ) # ID as requested to match search criteria
335
335
336
- unrequested_versions = set (self .process_revisions [0 ]) - set (proc_vers )
337
- for proc_ver in unrequested_versions :
338
- assert f"ProcessDescription wps:processVersion=\" { proc_ver } \" " not in resp .text , "filter did not work"
339
-
340
336
# number of identifiers must match the requested IDs/revisions that exist,
341
337
# even if they represent the same process after optional-latest revision resolution
342
338
# to ensure that PyWPS can resolve them against the specified query string ID values
343
339
# (PyWPS does not have special 'revision' logic, it considers them distinct processes without relationships)
344
- assert resp .text .count ("<ows:Identifier>" ) == len (process_revisions )
340
+ assert sum (
341
+ # need to include process ID in check to disambiguate from I/O ID
342
+ # however, stop at the 'ID' only (no revision / end XML block) to count all revisions together
343
+ resp .text .count (f"<ows:Identifier>{ p_id } " )
344
+ for p_id in self .process_ids
345
+ ) == len (process_revisions )
345
346
346
347
def test_describe_process_multi_revision_duplicates (self ):
347
348
headers = {"Accept" : ContentType .APP_XML }
0 commit comments