Fix unit tests for Werkzeug 2.2.0
For some reason a get request on a root fails if the url does not end with a trailing slash. This started happening since Werkzeug version 2.2.0 [1]. This is NOT a proper fix but a workaround that can be merged to unblock the CI. [1] https://werkzeug.palletsprojects.com/en/2.2.x/changes/#version-2-2-0 Change-Id: I53ba35471bbbe4e08f5aa6144a58d72b83bc2de0
This commit is contained in:
parent
809ee6e49f
commit
56e7ace0b7
|
@ -20,7 +20,7 @@ from sushy_tools.tests.unit.emulator import test_main
|
|||
class CertificateServiceTestCase(test_main.EmulatorTestCase):
|
||||
|
||||
def test_root(self, managers_mock, vmedia_mock):
|
||||
response = self.app.get('redfish/v1/CertificateService')
|
||||
response = self.app.get('redfish/v1/CertificateService/')
|
||||
|
||||
self.assertEqual(200, response.status_code)
|
||||
self.assertIn('#CertificateService.ReplaceCertificate',
|
||||
|
|
|
@ -26,7 +26,7 @@ class VirtualMediaTestCase(test_main.EmulatorTestCase):
|
|||
vmedia_mock.return_value.devices = ['CD', 'Floppy']
|
||||
|
||||
response = self.app.get(
|
||||
'redfish/v1/Managers/%s/VirtualMedia' % self.uuid)
|
||||
'/redfish/v1/Managers/%s/VirtualMedia/' % self.uuid)
|
||||
|
||||
self.assertEqual(200, response.status_code)
|
||||
self.assertEqual('Virtual Media Services', response.json['Name'])
|
||||
|
@ -40,7 +40,7 @@ class VirtualMediaTestCase(test_main.EmulatorTestCase):
|
|||
vmedia_mock.return_value.get_devices.return_value = []
|
||||
|
||||
response = self.app.get(
|
||||
'redfish/v1/Managers/' + self.uuid + '/VirtualMedia')
|
||||
'redfish/v1/Managers/' + self.uuid + '/VirtualMedia/')
|
||||
|
||||
self.assertEqual(200, response.status_code)
|
||||
self.assertEqual('Virtual Media Services', response.json['Name'])
|
||||
|
|
Loading…
Reference in New Issue