async def test_payto__confirmed_only(self, mock_save_db):
        """test that payto respects 'confirmed_only' config var"""
        wallet = restore_wallet_from_text('disagree rug lemon bean unaware square alone beach tennis exhibit fix mimic',
                                          gap_limit=2,
                                          path='if_this_exists_mocking_failed_648151893',
                                          config=self.config)['wallet']
        # bootstrap wallet
        funding_tx = Transaction('0200000000010165806607dd458280cb57bf64a16cf4be85d053145227b98c28932e953076b8e20000000000fdffffff02ac150700000000001600147e3ddfe6232e448a8390f3073c7a3b2044fd17eb102908000000000016001427fbe3707bc57e5bb63d6f15733ec88626d8188a02473044022049ce9efbab88808720aa563e2d9bc40226389ab459c4390ea3e89465665d593502206c1c7c30a2f640af1e463e5107ee4cfc0ee22664cfae3f2606a95303b54cdef80121026269e54d06f7070c1f967eb2874ba60de550dfc327a945c98eb773672d9411fd77181e00')
        funding_txid = funding_tx.txid()
        self.assertEqual('ede61d39e501d65ccf34e6300da439419c43393f793bb9a8a4b06b2d0d80a8a0', funding_txid)
        wallet.adb.receive_tx_callback(funding_tx, tx_height=TX_HEIGHT_UNCONFIRMED)

        cmds = Commands(config=self.config)

        async def create_tx():
            return await cmds.payto(
                destination="tb1qsyzgpwa0vg2940u5t6l97etuvedr5dejpf9tdy",
                amount="0.00123456",
                feerate=50,
                locktime=1972344,
                wallet=wallet)

        self.config.WALLET_SPEND_CONFIRMED_ONLY = True
        with self.assertRaises(NotEnoughFunds):
            tx_str = await create_tx()

        self.config.WALLET_SPEND_CONFIRMED_ONLY = None  # default: false
        tx_str = await create_tx()

        tx = tx_from_any(tx_str)
        self.assertEqual(2, len(tx.outputs()))
        txout = TxOutput.from_address_and_value("tb1qsyzgpwa0vg2940u5t6l97etuvedr5dejpf9tdy", 123456)
        self.assertTrue(txout in tx.outputs())
test that payto respects 'confirmed_only' config var
tests/test_commands.py