RedHatQE / pylero

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

Some functions use standard enum value and raise exception when verifying it. #87

Open TruongMinh89 opened 2 years ago

TruongMinh89 commented 2 years ago

In test_run.py: def create_incident_report(test_run, test_record, test_case): project_id = test_run.project_id status = 'open' ... incident_report.add_linked_item(test_case.work_item_id, "triggered_by") -> status variable is assigned to fixed string value that could be another value in non-standard configuration. E.g. 'draft', 'triggeredBy'

Similar with _status_change(self) function that was mentioned in other bug ("notrun", "finished", "inprogress") Similar with function add_test_record_by_fields. The fixed enum Id is "result", in my project, it is "testing/test-result" (shared enum). _cls_suds_map of TestRecord also use "enum_id": "result"

I think we need to have a solution to deal with this kind of changes. Otherwise the package cannot work with customized configuration without changing inside the package.