|
| 1 | +#!/usr/bin/env python |
| 2 | + |
| 3 | +from pyral import Rally |
| 4 | + |
| 5 | +from internal_rally_targets import APIKEY, WORKSPACE, PROJECT |
| 6 | + |
| 7 | +################################################################################################## |
| 8 | + |
| 9 | +def test_test_folder_fields(): |
| 10 | + """ |
| 11 | + Using a known valid Rally server and known valid access credentials, |
| 12 | + issue a simple query (no qualifying criteria) for a known valid |
| 13 | + Rally entity, and observe that you can access both standard and |
| 14 | + custom fields by the field Display Name. |
| 15 | + """ |
| 16 | + rally = Rally(apikey=APIKEY, workspace=WORKSPACE, project=PROJECT, isolated_workspace=True) |
| 17 | + response = rally.get('TestFolder', fetch=True, projectScopeDown=True) |
| 18 | + assert response.status_code == 200 |
| 19 | + assert response.resultCount > 10 |
| 20 | + tf = response.next() |
| 21 | + |
| 22 | + assert tf.TestFolderStatus is not None |
| 23 | + assert tf.TestFolderStatus.Name == 'Unknown' |
| 24 | + |
| 25 | + response2 = rally.get('TestFolder', fetch="FormattedID,Name,Parent,Children", projectScopeDown=True) |
| 26 | + assert response2.status_code == 200 |
| 27 | + assert response2.resultCount > 10 |
| 28 | + tf = response2.next() |
| 29 | + |
| 30 | + |
| 31 | +# def test_test_folder_subfields(): |
| 32 | +# """ |
| 33 | +# Using a known valid Rally server and known valid access credentials, |
| 34 | +# issue a simple query (no qualifying criteria) for a known valid |
| 35 | +# Rally entity, and observe that you can access both standard and |
| 36 | +# custom fields by the field Display Name. |
| 37 | +# """ |
| 38 | +# agicen = Rally(apikey=APIKEY, workspace=WORKSPACE, password=PROJECT, isolated_workspace=True) |
| 39 | +# #response = rally.get('TestFolder', fetch="FormattedID,Name,Parent,Children", projectScopeDown=True, isolated_workspace=True) |
| 40 | +# response = agicen.get('TestFolder', fetch=True, projectScopeDown=True) |
| 41 | +# assert response.status_code == 200 |
| 42 | +# assert response.resultCount > 10 |
| 43 | +# tf = response.next() |
| 44 | +# assert tf.TestFolderStatus.Name == 'Unknown' |
| 45 | + |
0 commit comments