File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
contrib/pyln-client/tests Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -435,3 +435,21 @@ def test4(request):
435435 ba = p ._bind_kwargs (test4 , {}, req )
436436 with pytest .raises (ValueError , match = r'current state is RequestState\.FINISHED(.*\n*.*)*MARKER4' ):
437437 test4 (* ba .args )
438+
439+
440+ def test_usage ():
441+ p = Plugin (autopatch = False )
442+
443+ @p .method ("some_method" , description = "some description" )
444+ def some_method (some_arg : str = None ):
445+ pass
446+
447+ manifest = p ._getmanifest ()
448+ usage = p .get_usage ()
449+
450+ assert manifest ['rpcmethods' ][0 ]['name' ] == 'some_method'
451+ assert "some_arg" in manifest ['rpcmethods' ][0 ]['usage' ]
452+ assert "some description" in manifest ['rpcmethods' ][0 ]['usage' ]
453+ assert "some_method" in usage
454+ assert "some_arg" in usage
455+ assert "some description" in usage
You can’t perform that action at this time.
0 commit comments