13
13
14
14
15
15
class ExampleService :
16
- async def DoThing (
17
- self , stream : "grpclib.server.Stream[Test, Test]"
18
- ):
16
+ async def DoThing (self , stream : "grpclib.server.Stream[Test, Test]" ):
19
17
request = await stream .recv_message ()
20
18
await stream .send_message (request )
21
19
22
20
def __mapping__ (self ) -> Dict [str , grpclib .const .Handler ]:
23
21
return {
24
22
"/repeated.ExampleService/DoThing" : grpclib .const .Handler (
25
- self .DoThing ,
26
- grpclib .const .Cardinality .UNARY_UNARY ,
27
- Test ,
28
- Test ,
23
+ self .DoThing , grpclib .const .Cardinality .UNARY_UNARY , Test , Test ,
29
24
),
30
25
}
31
26
@@ -34,6 +29,6 @@ def __mapping__(self) -> Dict[str, grpclib.const.Handler]:
34
29
async def test_sets_serialized_on_wire () -> None :
35
30
async with ChannelFor ([ExampleService ()]) as channel :
36
31
stub = ExampleServiceStub (channel )
37
- response = await stub .do_thing (names = ['a' , 'b' , 'c' ])
32
+ response = await stub .do_thing (names = ["a" , "b" , "c" ])
38
33
assert betterproto .serialized_on_wire (response )
39
- assert response .names == ['a' , 'b' , 'c' ]
34
+ assert response .names == ["a" , "b" , "c" ]
0 commit comments