Skip to content

Commit 1479a8e

Browse files
committed
Add gRPC client testing utilities
This commit introduces a new module which provides a framework for testing gRPC client implementations. The module simplifies mocking gRPC stub interactions and asserting client behavior for both unary and streaming calls. It allows defining test cases in separate Python files with a conventional structure, making tests more organized and maintainable. Key features include: - Discovery of test case files based on directory structure. - Mocking of gRPC responses and errors. - Assertion helpers for gRPC requests and client results/exceptions. - Support for unary-unary and unary-stream gRPC methods. Detailed usage instructions and examples are available in the module's docstring. Please note this module is added here temporarily and will be moved to the `frequenz-client-base` repository as a general test utility in the near future. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent b75b49b commit 1479a8e

File tree

1 file changed

+1275
-0
lines changed

1 file changed

+1275
-0
lines changed

0 commit comments

Comments
 (0)