Skip to content

Commit fbfccf7

Browse files
committed
review: fix tests
Signed-off-by: Fernando Rijo Cedeno <37381190+zFernand0@users.noreply.github.com>
1 parent 952871a commit fbfccf7

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎tests/unit/core/test_profile_manager.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,17 +297,16 @@ def test_validate_schema_logger(self, get_pass_func, mock_logger_warning: mock.M
297297
self.assertEqual(mock_logger_warning.call_args[0][0], "Could not find $schema property")
298298

299299
def test_schema_list_rejects_remote_schema(self):
300-
"""Test that schema_list does not fetch a remote schema URL and returns an empty list instead."""
300+
"""Test that schema_list does not fetch a remote schema URL and raises an error instead."""
301301
with mock.patch("requests.get") as mock_get:
302302
config_file = ConfigFile(
303303
name="zowe_abcd", type="User Config", schema_property="https://example.com/zowe.schema.json"
304304
)
305305
config_file.suppress_config_warnings(False)
306-
with self.assertWarns(UserWarning):
307-
result = config_file.schema_list()
306+
with self.assertRaises(ValueError):
307+
config_file.schema_list()
308308

309309
mock_get.assert_not_called()
310-
self.assertEqual(result, [])
311310

312311
@mock.patch("zowe.secrets_for_zowe_sdk.keyring.get_password", side_effect=keyring_get_password_exception)
313312
def test_secure_props_loading_warning(self, get_pass_func):

0 commit comments

Comments
 (0)