mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
pytest: test passing utf8 into and out of plugin JSON.
We should be able to pass UTF-8 strings to and from plugins without python turning them into JSON-\u escapes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
00f3a84af2
commit
5f437de771
14
tests/plugins/utf8.py
Executable file
14
tests/plugins/utf8.py
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
from lightning import Plugin
|
||||
|
||||
|
||||
plugin = Plugin()
|
||||
|
||||
|
||||
@plugin.method("utf8")
|
||||
def echo(plugin, utf8):
|
||||
assert '\\u' not in utf8
|
||||
return {'utf8': utf8}
|
||||
|
||||
|
||||
plugin.run()
|
||||
Reference in New Issue
Block a user