Skip to content

Commit ca02f03

Browse files
update tests
1 parent 8b603b7 commit ca02f03

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

tests/unitary/with_extras/aqua/test_handlers.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*--
3-
# Copyright (c) 2024 Oracle and/or its affiliates.
3+
# Copyright (c) 2024, 2025 Oracle and/or its affiliates.
44
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
55

66
import json
@@ -131,9 +131,13 @@ def test_finish(self, name, payload, expected_call, mock_super_finish):
131131
),
132132
aqua_api_details=dict(
133133
aqua_api_name="TestDataset.create",
134-
oci_api_name=TestDataset.mock_service_payload_create["operation_name"],
135-
service_endpoint=TestDataset.mock_service_payload_create["request_endpoint"]
136-
)
134+
oci_api_name=TestDataset.mock_service_payload_create[
135+
"operation_name"
136+
],
137+
service_endpoint=TestDataset.mock_service_payload_create[
138+
"request_endpoint"
139+
],
140+
),
137141
),
138142
"Authorization Failed: The resource you're looking for isn't accessible. Operation Name: get_job_run.",
139143
],
@@ -171,10 +175,13 @@ def test_write_error(self, name, input, expected_msg, mock_uuid, mock_logger):
171175
input.get("status_code"),
172176
),
173177
value=input.get("reason"),
174-
**aqua_api_details
178+
**aqua_api_details,
175179
)
176-
177-
mock_logger.warning.assert_called_with(expected_msg)
180+
error_message = (
181+
f"Error Request ID: {expected_reply['request_id']}\n"
182+
f"Error: {expected_reply['message']} {expected_reply['reason']}"
183+
)
184+
mock_logger.error.assert_called_with(error_message)
178185

179186

180187
class TestHandlers(unittest.TestCase):

0 commit comments

Comments
 (0)