tests: preparation to test several services
The `grpc_add_to_server` and `grpc_servicer` fixtures were just conveniences to feed the final server fixture, `grpc_server`, that we can redefine without so much duplication (most of the job is done in the definition of the lower level `_grpc_server`). At the other side of the spectrum, `grpc_stub_cls` was just a convenience to feed the actual `grpc_stub`. Again most of the job is just done in `grpc_channel` (that depends on `grpc_server` so that something is actually listening), and we just use `grpc_channel` and instantiate the stub to get a working client on our test class. In the end, we'll be able to add more servicers to `grpc_server`, and each test will use the appropriate stubs: tests depending on several services will simply use several stubs on a single channel.
Loading
Please register or sign in to comment