MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_invalid_currency

Function test_invalid_currency

tests/test_currencyrate.py:196–213  ·  view source on GitHub ↗
(node_factory)

Source from the content-addressed store, hash-verified

194
195
196def test_invalid_currency(node_factory):
197 opts = {}
198 l1 = node_factory.get_node(options=opts)
199
200 with pytest.raises(
201 RpcError,
202 match=r"no results for `XXX`, is the currency supported\? Check the logs!",
203 ):
204 rates = l1.rpc.call("listcurrencyrates", ["XXX"])
205 LOGGER.info(rates)
206
207 l1.daemon.wait_for_logs(["failed to get `XXX` rate from bitstamp",
208 "failed to get `XXX` rate from coinbase",
209 "failed to get `XXX` rate from coingecko",
210 "failed to get `XXX` rate from kraken",
211 "failed to get `XXX` rate from blockchain.info",
212 "failed to get `XXX` rate from coindesk",
213 "failed to get `XXX` rate from binance"])
214
215
216class _ServerThread(threading.Thread):

Callers

nothing calls this directly

Calls 3

wait_for_logsMethod · 0.80
get_nodeMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected