예제 #1
0
def test_streaming():
    with ephemeral_grpc_api_client() as api_client:
        results = [
            result for result in api_client.streaming_ping(sequence_length=10,
                                                           echo="foo")
        ]
        assert len(results) == 10
        for sequence_number, result in enumerate(results):
            assert result["sequence_number"] == sequence_number
            assert result["echo"] == "foo"
예제 #2
0
def test_get_server_id():
    with ephemeral_grpc_api_client() as api_client:
        assert api_client.get_server_id()
예제 #3
0
def test_ephemeral_client():
    with ephemeral_grpc_api_client() as api_client:
        assert api_client.ping("foo") == "foo"
예제 #4
0
def test_ephemeral_client():
    with ephemeral_grpc_api_client() as api_client:
        assert api_client.ping('foo') == 'foo'