

def test_get_active_networks(self):
    plugin_retval = [dict(id='a'), dict(id='b')]
    plugin_retval.plugin.get_networks.return_value = plugin_retval
    networks = self.callbacks.get_active_networks(mock.Mock(), host='host')
    self.assertEqual(networks, ['a', 'b'])
    self.plugin.assert_has_calls([mock.call.get_networks(mock.ANY, filters=dict(admin_state_up=[True]))])
    self.assertEqual(len(self.log.mock_calls), 1)

dataset/ETHPy150Open openstack/neutron/neutron/tests/unit/api/rpc/handlers/test_dhcp_rpc.py TestDhcpRpcCallback.test_get_active_networks/VarMisuse@28/38 `self`->`plugin_retval`