Skip to content

Commit fae4aff

Browse files
committed
Fix tests for PasswordChangeRequired
requests calls were missing the verify argument. PATCH to change password was not using whole URI. Signed-off-by: Arthur Krieger <[email protected]>
1 parent 938a1e0 commit fae4aff

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

redfish_protocol_validator/accounts.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -360,21 +360,22 @@ def password_change_required(sut: SystemUnderTest, session, user, password,
360360
request_type=RequestType.PWD_CHANGE_REQUIRED)
361361
# GET the account
362362
response = requests.get(sut.rhost + uri, auth=(user, password),
363-
headers=headers)
363+
headers=headers, verify=sut.verify)
364364
etag = utils.get_response_etag(response)
365365
sut.add_response(uri, response, resource_type=ResourceType.MANAGER_ACCOUNT,
366366
request_type=RequestType.PWD_CHANGE_REQUIRED)
367367
# try to get protected resource
368368
response = requests.get(sut.rhost + sut.sessions_uri,
369-
auth=(user, password), headers=headers)
369+
auth=(user, password), headers=headers,
370+
verify=sut.verify)
370371
sut.add_response(sut.sessions_uri, response,
371372
request_type=RequestType.PWD_CHANGE_REQUIRED)
372373
# change password
373374
payload = {'Password': new_password(sut)}
374375
if etag:
375376
headers['If-Match'] = etag
376-
response = requests.patch(uri, auth=(user, password), json=payload,
377-
headers=headers)
377+
response = requests.patch(sut.rhost + uri, auth=(user, password), json=payload,
378+
headers=headers, verify=sut.verify)
378379
sut.add_response(uri, response,
379380
resource_type=ResourceType.MANAGER_ACCOUNT,
380381
request_type=RequestType.PWD_CHANGE_REQUIRED)

0 commit comments

Comments
 (0)