File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ def test_warn_on_setting_invalid_workspace():
5757 rally = Rally (server = RALLY , user = RALLY_USER , password = RALLY_PSWD )
5858 workspace = rally .getWorkspace ()
5959 assert workspace .Name == DEFAULT_WORKSPACE
60- py .test .raises (Exception , "rally.setWorkspace('Constant Misbehavior')" )
60+ with py .test .raises (Exception ) as exc :
61+ rally .setWorkspace ('Constant Misbehavior' )
62+ assert 'Specified workspace not valid for your credentials or is in a Closed state' in str (exc )
6163 workspace = rally .getWorkspace ()
6264 assert workspace .Name == DEFAULT_WORKSPACE
6365
@@ -72,7 +74,9 @@ def test_warn_on_setting_invalid_project():
7274 rally = Rally (server = RALLY , user = RALLY_USER , password = RALLY_PSWD )
7375 project = rally .getProject ()
7476 assert project .Name == DEFAULT_PROJECT
75- py .test .raises (Exception , "rally.setProject('Thorny Buxcuit Weevilz')" )
77+ with py .test .raises (Exception ) as exc :
78+ rally .setProject ('Thorny Buxcuit Weevilz' )
79+ assert 'Specified project not valid for your current workspace or credentials' in str (exc )
7680 project = rally .getProject ()
7781 assert project .Name == DEFAULT_PROJECT
7882
You can’t perform that action at this time.
0 commit comments