Skip to content

Commit f603974

Browse files
fix marvin tests
1 parent 2f847d3 commit f603974

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

test/integration/smoke/test_global_settings.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,14 @@ def test_UpdateCommandsTimeoutConfigParamWithValidValue(self):
202202
self.debug("updated the parameter %s with value %s" % (updateConfigurationResponse.name, updateConfigurationResponse.value))
203203

204204
listConfigurationsCmd = listConfigurations.listConfigurationsCmd()
205-
listConfigurationsCmd.cfgName = updateConfigurationResponse.name
205+
listConfigurationsCmd.name = updateConfigurationResponse.name
206206
listConfigurationsResponse = self.apiClient.listConfigurations(listConfigurationsCmd)
207207

208-
self.assertEqual(listConfigurationsResponse.value, updateConfigurationResponse.value, "Check if the update API returned \
209-
is the same as the one we got in the list API")
208+
for item in listConfigurationsResponse:
209+
if item.name == updateConfigurationResponse.name:
210+
configParam = item
211+
212+
self.assertEqual(configParam.value, updateConfigurationResponse.value, "Check if the update API returned is the same as the one we got in the list API")
210213

211214

212215
@attr(tags=["devcloud", "basic", "advanced"], required_hardware="false")
@@ -224,7 +227,6 @@ def test_UpdateCommandsTimeoutConfigParamWithInvalidValue(self):
224227
self.fail("API call should have failed due to invalid format, but it succeeded.")
225228
except Exception as e:
226229
self.debug("Caught expected exception: %s" % str(e))
227-
error_response = e.error
228-
self.assertEqual(error_response['errorcode'], 431, "Expected error code 431 for invalid 21")
229-
self.assertEqual(error_response['cserrorcode'], 4350, "Expected CS error code 4350 for value parsing failure")
230-
self.assertIn("Validation failed", error_response['errortext'], "Expected error message related to format validation")
230+
error_message = str(e)
231+
self.assertIn("errorCode: 431", error_message, "Expected error code 431 for invalid format")
232+
self.assertIn("Validation failed", error_message, "Expected validation failure message")

0 commit comments

Comments
 (0)