pytest: add schema support for JSON responses.

This adds our first (basic) schema, and sews support into pyln-testing
so it will load schemas for any method for doc/schemas/{method}.schema.json.

All JSON responses in a test run are checked against the schema (if any).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2021-05-26 15:17:01 +09:30
parent 8a67c4a1ba
commit ea99a05249
6 changed files with 237 additions and 4 deletions

View File

@@ -349,6 +349,7 @@ class UnixDomainSocketRpc(object):
"enable": True
},
})
# FIXME: Notification schema support?
_, buf = self._readobj(sock, buf)
request = {