| 668 | |
| 669 | |
| 670 | def test_utf8_passthrough(node_factory, executor): |
| 671 | l1 = node_factory.get_node(options={'plugin': os.path.join(os.getcwd(), 'tests/plugins/utf8.py'), |
| 672 | 'log-level': 'io'}) |
| 673 | |
| 674 | # This works because Python unmangles. |
| 675 | res = l1.rpc.call('utf8', ['ナンセンス 1杯']) |
| 676 | assert '\\u' not in res['utf8'] |
| 677 | assert res['utf8'] == 'ナンセンス 1杯' |
| 678 | |
| 679 | # Now, try native. |
| 680 | out = subprocess.check_output(['cli/lightning-cli', |
| 681 | '--network={}'.format(TEST_NETWORK), |
| 682 | '--lightning-dir={}' |
| 683 | .format(l1.daemon.lightning_dir), |
| 684 | 'utf8', 'ナンセンス 1杯']).decode('utf-8') |
| 685 | assert '\\u' not in out |
| 686 | assert out == '{\n "utf8": "ナンセンス 1杯"\n}\n' |
| 687 | |
| 688 | |
| 689 | def test_invoice_payment_hook(node_factory): |