| Index: tests/test_xtm_api.py |
| diff --git a/tests/test_xtm_api.py b/tests/test_xtm_api.py |
| index fb1708090dcdda6bae1b12dc16b253a036caff62..d92c09c20d8b0fca3bc6de33b10dfe2389a10ccb 100644 |
| --- a/tests/test_xtm_api.py |
| +++ b/tests/test_xtm_api.py |
| @@ -138,3 +138,20 @@ def test_file_upload(intercept, token, project_id, files, exp_err, exp_msg, |
| exception_test(api.upload_files, exp_err, exp_msg, files, project_id) |
| else: |
| assert exp_jobs == api.upload_files(files, project_id) |
| + |
| + |
| +@pytest.mark.parametrize('token,name,exact,exp_err,exp_msg,exp_ids', [ |
| + (_INVALID_TOKEN, 'foo', True, XTMCloudException, 'Authentication ' |
| + 'failed', None), |
| + (_VALID_TOKEN, 'workflow', True, None, None, []), |
| + (_VALID_TOKEN, 'workflow1', True, None, None, [2222]), |
| + (_VALID_TOKEN, 'workflow', False, None, None, [2222, 3333]), |
| +]) |
| +def test_workflow_id_extraction(intercept, token, name, exact, exp_err, |
| + exp_msg, exp_ids): |
| + api = XTMCloudAPI(token) |
| + if exp_msg is not None: |
| + exception_test(api.get_workflows_by_name, exp_err, exp_msg, name, |
| + exact) |
| + else: |
| + assert exp_ids == api.get_workflows_by_name(name, exact) |