Skip to content

Commit

Permalink
pytest: Add failing test for unicode in JSON-RPC through pylightning
Browse files Browse the repository at this point in the history
  • Loading branch information
cdecker committed Nov 26, 2019
1 parent 17bb862 commit ba9e35a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1998,3 +1998,15 @@ def test_new_node_is_mainnet(node_factory):
assert not os.path.isfile(os.path.join(basedir, "hsm_secret"))
assert not os.path.isfile(os.path.join(netdir, "lightningd-bitcoin.pid"))
assert os.path.isfile(os.path.join(basedir, "lightningd-bitcoin.pid"))


@pytest.mark.xfail(strict=True)
def test_unicode_rpc(node_factory):
node = node_factory.get_node()
desc = "Some candy 🍬 and a nice glass of milk 🥛."

node.rpc.invoice(msatoshi=42, label=desc, description=desc)
invoices = node.rpc.listinvoices()['invoices']
assert(len(invoices) == 1)
assert(invoices[0]['description'] == desc)
assert(invoices[0]['label'] == desc)

0 comments on commit ba9e35a

Please sign in to comment.