'Validate default behavior.'

@mock.patch('nova.network.neutronv2.api.get_client')
@mock.patch('nova.network.neutronv2.api.API._get_floating_ip_by_address', return_value={'port_id': None, 'id': 'abc'})
def test_release_floating_ip(self, mock_get_ip, mock_ntrn):

    mock_nc = mock.Mock()
    mock_ntrn.return_value = mock_nc
    address = '172.24.4.227'
    self.api.release_floating_ip(self.context, address)
    mock_ntrn.assert_called_once_with(self.context)
    mock_get_ip.assert_called_once_with(mock_nc, address)
    mock_nc.delete_floatingip.assert_called_once_with('abc')
