[tempest] also catch BadRequest in negative tests with physical_network in old API
Before this field was introduced we would raise BadRequest (HTTP 400),
after - NotAcceptable (HTTP 406).
Check for any of the exceptions to allow branchless testing.
Change-Id: I3fafd4ef7f046a9195fc15f47f7fc967fb959550
diff --git a/ironic_tempest_plugin/tests/api/admin/test_ports_negative.py b/ironic_tempest_plugin/tests/api/admin/test_ports_negative.py
index 492c86c..c25020b 100644
--- a/ironic_tempest_plugin/tests/api/admin/test_ports_negative.py
+++ b/ironic_tempest_plugin/tests/api/admin/test_ports_negative.py
@@ -354,7 +354,7 @@
node_id = self.node['uuid']
address = data_utils.rand_mac_address()
- self.assertRaises(lib_exc.UnexpectedResponseCode,
+ self.assertRaises((lib_exc.BadRequest, lib_exc.UnexpectedResponseCode),
self.create_port,
node_id=node_id, address=address,
physical_network='physnet1')
@@ -371,7 +371,7 @@
'op': 'replace',
'value': new_physnet}]
- self.assertRaises(lib_exc.UnexpectedResponseCode,
+ self.assertRaises((lib_exc.BadRequest, lib_exc.UnexpectedResponseCode),
self.client.update_port,
port['uuid'], patch)