1515TRIAL = "trial.rallydev.com"
1616PROD = "us1.rallydev.com"
1717
18- 19- # TRIAL_PSWD = "********"
18+ 19+ TRIAL_PSWD = "********"
2020
2121HTTPS_PROXY = "127.0.0.1:9654"
2222
@@ -60,13 +60,14 @@ def test_nonexistent_server():
6060 bogus_server = "bogus.notreally.bug"
6161 expectedErrMsg = "ping: cannot resolve %s: Unknown host" % bogus_server
6262 #print expectedErrMsg
63+ winExpectedErrMsg = "Ping request could not find host %s" % bogus_server
6364 with py .test .raises (RallyRESTAPIError ) as excinfo :
6465 rally = Rally (server = bogus_server )
6566 actualErrVerbiage = excinfo .value .args [0 ] # becuz Python2.6 deprecates message :-(
6667 #print actualErrVerbiage
6768 assert excinfo .value .__class__ .__name__ == 'RallyRESTAPIError'
6869 #assert actualErrVerbiage == expectedErrMsg
69- assert expectedErrMsg in actualErrVerbiage
70+ assert ( expectedErrMsg in actualErrVerbiage or winExpectedErrMsg in actualErrVerbiage )
7071 time .sleep (1 )
7172
7273
@@ -130,12 +131,13 @@ def test_bad_server_spec():
130131 """
131132 bad_server = "ww!w.\f o,o\r \n .c%om"
132133 expectedErrMsg = "Unknown host"
134+ winExpectedErrMsg = "could not find host"
133135 with py .test .raises (RallyRESTAPIError ) as excinfo :
134136 rally = Rally (server = bad_server , timeout = 3 )
135137 response = rally .get ('Project' , fetch = False , limit = 10 )
136138 actualErrVerbiage = excinfo .value .args [0 ] # becuz Python2.6 deprecates message :-(
137139 assert excinfo .value .__class__ .__name__ == 'RallyRESTAPIError'
138- assert 'cannot resolve' in actualErrVerbiage and 'Unknown host' in actualErrVerbiage
140+ assert ( expectedErrMsg in actualErrVerbiage or winExpectedErrMsg in actualErrVerbiage )
139141 time .sleep (1 )
140142
141143 with py .test .raises (RallyRESTAPIError ) as excinfo :
@@ -145,7 +147,7 @@ def test_bad_server_spec():
145147 response = rally .get ('Project' , fetch = False , limit = 5 )
146148 actualErrVerbiage = excinfo .value .args [0 ] # becuz Python2.6 deprecates message :-(
147149 assert excinfo .value .__class__ .__name__ == 'RallyRESTAPIError'
148- assert 'cannot resolve' in actualErrVerbiage and 'Unknown host' in actualErrVerbiage
150+ assert ( expectedErrMsg in actualErrVerbiage or winExpectedErrMsg in actualErrVerbiage )
149151 time .sleep (1 )
150152
151153def test_insuff_credentials ():
0 commit comments