Skip to content

Commit f44cb62

Browse files
author
Nivedithaa Mahendran
committed
updated query param
1 parent 292cd54 commit f44cb62

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/mas/devops/users.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def get_user(self, user_id):
217217
url = f"{self.manage_api_url_internal}/maximo/api/os/masperuser"
218218
querystring = {
219219
"lean": 1,
220-
"oslc.where": f"userid=\"{user_id}\""
220+
"oslc.where": f"user.userid=\"{user_id}\""
221221
}
222222
headers = {
223223
"Accept": "application/json",

test/src/test_users.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ def mock_get_user(requests_mock, user_id, json, status_code, mock_manage_api_key
210210
)
211211

212212
# Mock Manage API endpoint for version >= 9.1
213-
# Uses query parameter oslc.where instead of path parameter
213+
# Uses query parameter oslc.where with user.userid instead of path parameter
214214
manage_mock = requests_mock.get(
215-
f"{MANAGE_API_URL}/maximo/api/os/masperuser?lean=1&oslc.where=userid%3D%22{user_id}%22",
215+
f"{MANAGE_API_URL}/maximo/api/os/masperuser?lean=1&oslc.where=user.userid%3D%22{user_id}%22",
216216
request_headers={"apikey": mock_manage_api_key["apikey"]},
217217
json=json,
218218
status_code=status_code,

0 commit comments

Comments
 (0)