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

Function test_datastore_escapeing

tests/test_misc.py:3993–4002  ·  view source on GitHub ↗

This test demonstrates that there is some character escaping issue issue in the datastore API and error messages during startup that affect plugins init method.

(node_factory)

Source from the content-addressed store, hash-verified

3991
3992
3993def test_datastore_escapeing(node_factory):
3994 """ This test demonstrates that there is some character escaping issue
3995 issue in the datastore API and error messages during startup that
3996 affect plugins init method. """
3997 setdata = '{"foo": "bar"}'
3998 l1 = node_factory.get_node()
3999 l1.rpc.datastore(key='foo_bar', string=setdata)
4000 getdata = l1.rpc.listdatastore('foo_bar')['datastore'][0]['string']
4001 assert not l1.daemon.is_in_log(r".*listdatastore error.*token has no index 0.*")
4002 assert getdata == setdata
4003
4004
4005def test_datastore(node_factory):

Callers

nothing calls this directly

Calls 4

listdatastoreMethod · 0.80
is_in_logMethod · 0.80
get_nodeMethod · 0.45
datastoreMethod · 0.45

Tested by

no test coverage detected