We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried to demo this pytest framework by writing a unit test for the RouteGuide service that is part of the python grpc examples.
test_routeguide.py
import pytest @pytest.fixture(scope='module') def grpc_add_to_server(): from route_guide_pb2_grpc import add_RouteGuideServicer_to_server return add_RouteGuideServicer_to_server @pytest.fixture(scope='module') def grpc_servicer(): from route_guide_server import RouteGuideServicer return RouteGuideServicer() @pytest.fixture(scope='module') def grpc_stub(grpc_channel): from route_guide_pb2_grpc import RouteGuideStub return RouteGuideStub(grpc_channel) # inspired from guide_list_features() in route_guide_client.py def test_ListFeatures(grpc_stub): from route_guide_pb2 import Rectangle, Point rectangle = Rectangle( lo=Point(latitude=400000000, longitude=-750000000), hi=Point(latitude=420000000, longitude=-730000000)) features = grpc_stub.ListFeatures(rectangle) for feature in features: print("Feature called %s at %s" % (feature.name, feature.location))
and I get Error: fixture 'grpc_channel' not found when I run pytest.
Error: fixture 'grpc_channel' not found
The text was updated successfully, but these errors were encountered:
Did you install the plugin? It's strangely not mentioned in the readme.
pip install pytest-grpc
Sorry, something went wrong.
No branches or pull requests
I tried to demo this pytest framework by writing a unit test for the RouteGuide service that is part of the python grpc examples.
test_routeguide.py
and I get
Error: fixture 'grpc_channel' not found
when I run pytest.The text was updated successfully, but these errors were encountered: