How to write python GRPC unittest

We use grpc as the RPC protocol for our entire internal system. Most of the system is written in Java.

In Java, we can use InprocessServerBuilder for unittest. However, I did not find a similar class in Python.

Can someone provide some sample code for how to uninstall GRPC in python?

+7
source share
2 answers

How clear is this question today; our unit test framework has just introduced a code review . Thus, while the test should use the full production stack to connect your client and server code (or violate the API and make fun of a lot of internal material), but I hope that within a few days to a week a much better solution will be available to you.

+4
source

I find Pytest-GRPC easy to follow and get it working in minutes.

source: https://pypi.org/project/pytest-grpc/

0
source

Source: https://habr.com/ru/post/1269147/


All Articles