

def test_get_network_info(self):
    network_retval = dict(id='a')
    subnet_retval = mock.Mock()
    port_retval = mock.Mock()
    self.plugin.get_network.return_value = network_retval
    self.plugin.get_subnets.return_value = subnet_retval
    self.plugin.get_ports.return_value = port_retval
    retval = self.callbacks.get_network_info(mock.Mock(), network_id='a')
    self.assertEqual(retval, network_retval)
    self.assertEqual(retval['subnets'], subnet_retval)
    self.assertEqual(retval['ports'], port_retval)

dataset/ETHPy150Open openstack/neutron/neutron/tests/unit/api/rpc/handlers/test_dhcp_rpc.py TestDhcpRpcCallback.test_get_network_info/original