forked from RallyTools/RallyRestToolkitForPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_folder_misc.py
More file actions
45 lines (36 loc) · 1.86 KB
/
Copy pathtest_folder_misc.py
File metadata and controls
45 lines (36 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python
from pyral import Rally
from internal_rally_targets import APIKEY, WORKSPACE, PROJECT
##################################################################################################
def test_test_folder_fields():
"""
Using a known valid Rally server and known valid access credentials,
issue a simple query (no qualifying criteria) for a known valid
Rally entity, and observe that you can access both standard and
custom fields by the field Display Name.
"""
rally = Rally(apikey=APIKEY, workspace=WORKSPACE, project=PROJECT, isolated_workspace=True)
response = rally.get('TestFolder', fetch=True, projectScopeDown=True)
assert response.status_code == 200
assert response.resultCount > 10
tf = response.next()
assert tf.TestFolderStatus is not None
assert tf.TestFolderStatus.Name == 'Unknown'
response2 = rally.get('TestFolder', fetch="FormattedID,Name,Parent,Children", projectScopeDown=True)
assert response2.status_code == 200
assert response2.resultCount > 10
tf = response2.next()
# def test_test_folder_subfields():
# """
# Using a known valid Rally server and known valid access credentials,
# issue a simple query (no qualifying criteria) for a known valid
# Rally entity, and observe that you can access both standard and
# custom fields by the field Display Name.
# """
# agicen = Rally(apikey=APIKEY, workspace=WORKSPACE, password=PROJECT, isolated_workspace=True)
# #response = rally.get('TestFolder', fetch="FormattedID,Name,Parent,Children", projectScopeDown=True, isolated_workspace=True)
# response = agicen.get('TestFolder', fetch=True, projectScopeDown=True)
# assert response.status_code == 200
# assert response.resultCount > 10
# tf = response.next()
# assert tf.TestFolderStatus.Name == 'Unknown'