def test__setup_tunnel_port_while_new_mapping_is_added(self):

        def add_new_vlan_mapping(*args, **kwargs):
            self.agent.local_vlan_map['bar'] = (
                self.mod_agent.LocalVLANMapping(1, 2, 3, 4))
        bridge = mock.Mock()
        tunnel_type = 'vxlan'
        self.agent.tun_br_ofports = {tunnel_type: dict()}
        self.agent.l2_pop = False
        self.agent.local_vlan_map = {
            'foo': self.mod_agent.LocalVLANMapping(4, tunnel_type, 2, 1)}
        bridge.install_flood_to_tun.side_effect = add_new_vlan_mapping
        self.agent._setup_tunnel_port(bridge, 1, 2, tunnel_type=tunnel_type)
        self.assertIn('bar', self.agent.local_vlan_map)
Test that _setup_tunnel_port doesn't fail if new vlan mapping is
dataset/ETHPy150Open openstack/neutron/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py/TestOvsNeutronAgent.test__setup_tunnel_port_while_new_mapping_is_added