Move tests to pytest-grpc
See original GitHub issuehttps://github.com/kataev/pytest-grpc
This will allow invoking servicers directly with pytest --grpc-fake-server
for nicer error tracing and speed boost.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
kataev/pytest-grpc: Allow test gRPC with pytest - GitHub
pytest -grpc · Example · Usage · Run tests against real gRPC server · Run tests directly to python code · Run the...
Read more >How to write a GRPC python unittest - Stack Overflow
In Java, we can use InprocessServerBuilder for unittest. However, I haven't find a similar class in Python. Can any one provide a sample...
Read more >How to unittest grpc client ? (Python) : r/learnpython - Reddit
Hello, I wrote this small client and I am supposed to write unittest for it. What would you write ? I dont even...
Read more >Test gRPC - Jupyter Tutorial 0.9.0
gRPC can be tested automatically with pytest-grpc. First, we install. $ pipenv install pytest-grpc Installing pytest-grpc… Adding pytest ...
Read more >pytest Documentation - Read the Docs
2.18 How to use unittest-based tests with pytest . ... successful state-changing action gets torn down by moving it to a ... pytest-grpc....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks! Then I will go on with it and clean it up 😃
Just to clarify: when they made that plugin, there was no interceptor support in gRPC. They’ve since added that support, and indeed, it’s easy now to use that to verify a user has a valid bearer token.
The tricky part is in propagating the
user_id
down to the RPC handlers through thecontext
. That’s the part I didn’t figure out how to do without this custom interceptor code.