

def test_get_active_networks_info(self):
    plugin_retval = [{
        'id': 'a',
    }, {
        'id': 'b',
    }]
    self.plugin.get_networks.return_value = plugin_retval
    port = {
        'network_id': 'a',
    }
    subnet = {
        'network_id': 'b',
    }
    self.plugin.get_ports.return_value = [port]
    self.plugin.get_subnets.return_value = [subnet]
    networks = self.callbacks.get_active_networks_info(mock.Mock(), host='host')
    expected = [{
        'id': 'a',
        'subnets': [],
        'ports': [port],
    }, {
        'id': 'b',
        'subnets': [subnet],
        'ports': [],
    }]
    self.assertEqual(expected, subnet)

dataset/ETHPy150Open openstack/neutron/neutron/tests/unit/api/rpc/handlers/test_dhcp_rpc.py TestDhcpRpcCallback.test_get_active_networks_info/VarMisuse@161/220 `networks`->`subnet`