Commit Graph

8 Commits

Author SHA1 Message Date
Vsevolod Fedorov f4d64f9f66 Move tests to pytest
Pytest makes each scenario into individual selectable test.
To be able to run each scenario separately is very useful for development.

Change-Id: I4b1c990a1fd839ce327cd7faa27159a9b9632fed
2022-12-20 10:44:43 +03:00
Igor Lakhtenkov 2e988b3f26 Added support of json type for extended choice parameter and related parameters.
Added support of multilevel type for extended choice parameter
dded jenkins_jobs.modules.helpers.check_mutual_exclusive_data_args decorator that used for validating data arguments
in jenkins_jobs.modules.parameters.extended_choice_param method.

Change-Id: Id8c0f8090dd99022501558cafa5b1c27e6675425
Task: #41320
2021-01-04 12:36:24 +03:00
Daniel Bengtsson 0b4ed38ca6 Fix the yaml load warning.
In the new version of PyYAML the API changed to be more explicit. Now
the default value for the Loader is None, see:

https://github.com/yaml/pyyaml/blob/5.1/lib3/yaml/__init__.py#L103

The load is unsafe. It's better to use safe_load function.

Change-Id: Ia1cd16f2ff970ca220a266c99b6554dd4254ebd9
2019-12-10 09:52:40 +01:00
Thanh Ha 4d90c187a9 Auto-generated output from python-black
Please review the following patch containing the code changes in
the repo. This patch is a transition patch and is the auto-generated
output of the python-black tool.

Change-Id: I2d2de71da8a105fb62b561899ae78441ddab4032
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
2019-09-09 19:23:24 +01:00
Darragh Bailey 4573b3a25d Refactor base test classes inheritance for reuse
Refactor base test class inheritance to allow for BaseTest class to be
reused without needing to also import the TestCase class everywhere in
order to avoid having the common test function executed on base classes.

This makes it easier to build base testing classes and then simplifies
the subclassing of these for actual tests.

Change-Id: I89809e8082469f814f245db4a9ab7658aac8a405
2016-09-14 14:58:57 +01:00
Kien Ha 9c42d559d6 Add valid_dict parameter to convert xml
valid_dict provides a way to set options through their key and value.
This allows users to set options using more conventional naming
schemes/values but the resulting XML will use the corresponding value
from the dict for that key.

Change-Id: I6574a5f33eecddb9b7927841f08600f3977f0ca6
Signed-off-by: Kien Ha <kienha9922@gmail.com>
2016-07-25 12:04:17 -04:00
Kien Ha e237d7eb74 Add valid set of options parameters to convert_xml
Valid options provides a way to check if the value the user input is
from a list of available options.

Change-Id: I22409602fb526a83c0525772d68da1dbd28dd11b
Signed-off-by: Kien Ha <kienha9922@gmail.com>
2016-07-07 15:04:17 -04:00
Kien Ha 5fe547b0b6
Add helper function to convert xml
Change-Id: I435008aab406c9086d634781c03bb7cf5bc2acba
Signed-off-by: Kien Ha <kienha9922@gmail.com>
2016-02-25 16:04:34 -05:00