Fix broken unit tests with Werkzeug>=2.3.0
Werkzeug>=2.3.0 introduced a logic to detect incorrect Content-Type and now returns 415 instead of 400 if an application tries to load request body as json but Content-Type is not `application/json`. This fixes the unit test broken by that change. Change-Id: I3470813661be312eac7bbead91af7913aa15ac9d
This commit is contained in:
parent
0e18baab40
commit
f907ec9c27
@ -131,7 +131,8 @@ class VirtualMediaTestCase(test_main.EmulatorTestCase):
|
||||
|
||||
def test_virtual_media_update_empty(self, systems_mock, vmedia_mock):
|
||||
response = self.app.patch(
|
||||
'/redfish/v1/Systems/%s/VirtualMedia/CD' % self.uuid)
|
||||
'/redfish/v1/Systems/%s/VirtualMedia/CD' % self.uuid,
|
||||
headers={'Content-Type': 'application/json'})
|
||||
|
||||
self.assertEqual(400, response.status_code)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user