def get_unspents(address, bitcoind):
    """
    Used for testing only!

    Get the spendable transaction outputs, also known as UTXOs or
    unspent transaction outputs.

    NOTE: this will only return unspents if the address provided is present
    in the bitcoind server.
    """
    assert BLOCKSTACK_TEST, 'get_unspents can only be used in test mode!'

    addresses = [address]
    
    min_confirmations = 0
    max_confirmation = 2000000000  # just a very large number for max
    unspents = bitcoind.listunspent(min_confirmations, max_confirmation, addresses)

    if BLOCKSTACK_TEST and len(unspents) == 0:
        try:
            bitcoind.importaddress(str(address))
            unspents = bitcoind.listunspent(min_confirmations, max_confirmation, addresses)
        except Exception as e:
            return format_unspents([])

    return format_unspents(unspents)
Used for testing only!

    Get the spendable transaction outputs, also known as UTXOs or
    unspent transaction outputs.

    NOTE: this will only return unspents if the address provided is present
    in the bitcoind server.