api/tests: add a few test for the whole rpc client/server stack
This uses both
- the
client
test fixture (from pytest-flask) to allow to easily call RPCServerApp based application methods, - a
requests
Adapter class to make the RPCClient based proxy route the HTTP requests directly to the RPCServerApp test client above, without the need for a running HTTP server.
This adapter implements the send()
method to call the flake test app open()
method (instead of doing a real network connection), and convert the
wertzeug based Response object into a requests
one.
ing this stack, implements a few tests for an RPC client/server communication session.
Depends on !88 (closed)
Migrated from D2116 (view on Phabricator)