Fix implicit-str-concat warnings

Noticed two test files had these warnings, fixed them.
No functional change.

TrivialFix

Change-Id: I495aaef050da2bd10912d87451b8177a6a929563
This commit is contained in:
Brian Haley 2024-01-12 15:42:00 -05:00
parent a89b5e5772
commit 3e2ae14c07
2 changed files with 12 additions and 15 deletions

View File

@ -166,7 +166,7 @@ class TestOvsNeutronAgent(object):
mock.patch('oslo_service.loopingcall.FixedIntervalLoopingCall',
new=MockFixedIntervalLoopingCall),\
mock.patch(
'neutron.agent.common.ovs_lib.OVSBridge.' 'get_vif_ports',
'neutron.agent.common.ovs_lib.OVSBridge.get_vif_ports',
return_value=[]),\
mock.patch('neutron.agent.rpc.PluginReportStateAPI.'
'has_alive_neutron_server'):
@ -241,7 +241,7 @@ class TestOvsNeutronAgent(object):
mock.patch('oslo_service.loopingcall.FixedIntervalLoopingCall',
new=MockFixedIntervalLoopingCall), \
mock.patch(
'neutron.agent.common.ovs_lib.OVSBridge.' 'get_vif_ports',
'neutron.agent.common.ovs_lib.OVSBridge.get_vif_ports',
return_value=[]), \
mock.patch('neutron.agent.common.ovs_lib.BaseOVS.config',
new_callable=mock.PropertyMock,
@ -3102,7 +3102,7 @@ class AncillaryBridgesTest(object):
'get_ports_attributes',
return_value=[]),\
mock.patch(
'neutron.agent.common.ovs_lib.OVSBridge.' 'get_vif_ports',
'neutron.agent.common.ovs_lib.OVSBridge.get_vif_ports',
return_value=[]),\
mock.patch('neutron.agent.rpc.PluginReportStateAPI.'
'has_alive_neutron_server'):
@ -3219,7 +3219,7 @@ class TestOvsDvrNeutronAgent(object):
'get_ports_attributes',
return_value=[]),\
mock.patch(
'neutron.agent.common.ovs_lib.OVSBridge.' 'get_vif_ports',
'neutron.agent.common.ovs_lib.OVSBridge.get_vif_ports',
return_value=[]),\
mock.patch('neutron.agent.rpc.PluginReportStateAPI.'
'has_alive_neutron_server'):

View File

@ -1280,9 +1280,8 @@ class L3DvrSchedulerTestCase(L3SchedulerBaseMixin,
]
agent_on_host = {'id': 'agent1'}
with mock.patch(
'neutron.db.db_base_plugin_v2.NeutronDbPluginV2' '.get_ports',
return_value=dvr_ports),\
with mock.patch.object(db_v2.NeutronDbPluginV2, 'get_ports',
return_value=dvr_ports),\
mock.patch('neutron.api.rpc.agentnotifiers.l3_rpc_agent_api'
'.L3AgentNotifyAPI'),\
mock.patch.object(
@ -1318,11 +1317,10 @@ class L3DvrSchedulerTestCase(L3SchedulerBaseMixin,
'distributed': True,
}
with mock.patch(
'neutron.db.db_base_plugin_v2.NeutronDbPluginV2' '.get_port',
return_value=dvr_port),\
mock.patch('neutron.db.db_base_plugin_v2.NeutronDbPluginV2'
'.get_ports', return_value=[dvr_port]):
with mock.patch.object(db_v2.NeutronDbPluginV2, 'get_port',
return_value=dvr_port),\
mock.patch.object(db_v2.NeutronDbPluginV2, 'get_ports',
return_value=[dvr_port]):
router_id = self.dut.get_dvr_routers_by_subnet_ids(
self.adminContext, [subnet_id])
self.assertEqual(r1['id'], router_id.pop())
@ -1344,9 +1342,8 @@ class L3DvrSchedulerTestCase(L3SchedulerBaseMixin,
'distributed': True,
}
with mock.patch(
'neutron.db.db_base_plugin_v2.NeutronDbPluginV2' '.get_ports',
return_value=[dvr_port]):
with mock.patch.object(db_v2.NeutronDbPluginV2, 'get_ports',
return_value=[dvr_port]):
sub_ids = self.dut.get_subnet_ids_on_router(self.adminContext,
r1['id'])
self.assertEqual(sub_ids.pop(),