From d85a1ed1103917395c137428891dd58a12e1076a Mon Sep 17 00:00:00 2001 From: "Mitch Harding (the weird one)" Date: Tue, 17 Sep 2024 15:14:48 -0400 Subject: [PATCH] test --- cray/tests/test_modules/test_bos.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cray/tests/test_modules/test_bos.py b/cray/tests/test_modules/test_bos.py index a0f9b21..a42045f 100644 --- a/cray/tests/test_modules/test_bos.py +++ b/cray/tests/test_modules/test_bos.py @@ -168,6 +168,25 @@ def test_cray_bos_v2_components_base(cli_runner, rest_mock): assert txt in result.output +def test_cray_bos_v2_components_update_basic(cli_runner, rest_mock): + """ Test cray bos v2 components updatemany""" + runner, cli, config = cli_runner + result = runner.invoke( + cli, + ['bos', 'v2', 'components', 'update', '--retry-policy', '2', 'fakexname'] + ) + assert result.exit_code == 0 + data = json.loads(result.output) + assert data['method'] == 'PATCH' + assert data['url'] == bos_url(config, ver="v2", uri='/components/fakexname') + compare_dicts( + { + 'retry_policy': 2 + }, + data['body'] + ) + + def test_cray_bos_v2_components_update(cli_runner, rest_mock): """ Test cray bos v2 components updatemany""" runner, cli, config = cli_runner