From ed00e9ee2e9addf2605144b95c60bd7d65d3c041 Mon Sep 17 00:00:00 2001 From: Nisha Agarwal Date: Fri, 18 Feb 2022 10:26:08 +0000 Subject: [PATCH] Fix test cases for sushy 4.1.0 Change-Id: I28ab424fd1bd371e32288affd52b7d8722d419ae --- proliantutils/tests/redfish/resources/system/test_system.py | 6 ++++-- requirements.txt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/proliantutils/tests/redfish/resources/system/test_system.py b/proliantutils/tests/redfish/resources/system/test_system.py index 1d598d93..da15f523 100644 --- a/proliantutils/tests/redfish/resources/system/test_system.py +++ b/proliantutils/tests/redfish/resources/system/test_system.py @@ -1,4 +1,4 @@ -# Copyright 2018 Hewlett Packard Enterprise Development LP +# Copyright 2018-2022 Hewlett Packard Enterprise Development LP # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -40,6 +40,7 @@ class HPESystemTestCase(testtools.TestCase): def setUp(self): super(HPESystemTestCase, self).setUp() self.conn = mock.MagicMock() + self.conn.get.return_value.headers = {'Allow': 'GET,HEAD'} with open('proliantutils/tests/redfish/' 'json_samples/system.json', 'r') as f: system_json = json.loads(f.read()) @@ -181,7 +182,8 @@ class HPESystemTestCase(testtools.TestCase): mock.call('/redfish/v1/Systems/1', data={'Boot': {'BootSourceOverrideTarget': 'UefiTarget', - 'BootSourceOverrideEnabled': 'Continuous'}})] + 'BootSourceOverrideEnabled': 'Continuous'}}, + headers=None)] self.sys_inst._conn.patch.assert_has_calls(calls) def test_update_persistent_boot_uefi_no_iscsi_device(self): diff --git a/requirements.txt b/requirements.txt index e47b028b..06af610c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ retrying!=1.3.0,>=1.2.3 # Apache-2.0 pysnmp>=4.2.3,<5.0.0 # BSD # Redfish communication uses the Sushy library -sushy>=3.11.0 +sushy>=4.1.0 pyOpenSSL>=19.1.0