RedHatQE / pylero

Python wrapper for the Polarion WSDL API
https://redhatqe.github.io/pylero/
MIT License
37 stars 25 forks source link

Fix testrun search method params with limit #90

Closed waynesun09 closed 2 years ago

waynesun09 commented 2 years ago

Only searchTestRunsWithFieldsLimited and searchTestRunTemplatesWithFieldsLimited methods support the limit parameter.

Methods don't support limit parameter:

Fix the param error with only add the limit param when limit parameter is not None.

This update also add searchTestRunsWithFields and searchTestRunTemplatesWithFields methods.

This fixes: https://github.com/RedHatQE/pylero/issues/89

Reference: https://almdemo.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/ws/client/testmanagement/TestManagementWebService.html#searchTestRuns(java.lang.String,java.lang.String)

Signed-off-by: Wayne Sun gsun@redhat.com

leelavg commented 2 years ago

Change lgtm, how come it worked with suds-py3 :/

waynesun09 commented 2 years ago

Yeah, no idea, maybe the method have changed.

leelavg commented 2 years ago

ack, if you don't mind, I'd like to check on something tomorrow before merging this.

waynesun09 commented 2 years ago

Sure, no hurry

waynesun09 commented 2 years ago

What about 'searchTestRunTemplatesLimited' (without 'WithFields')?

I think the default value of 'limit' should be None instead of -1. Only when limit is not None , there is a need to call the 'Limited' functions. But, if we set the default value of 'limit' to '-1', then 'Limited' functions should be called anyway.

Agree, I've made the change. This will add searchTestRunsWithFields and searchTestRunTemplatesWithFields methods, it would not break backward compatibility.

waynesun09 commented 2 years ago

Created new issue https://github.com/RedHatQE/pylero/issues/91 for test