(session)
| 45 | |
| 46 | |
| 47 | async def fetch(session): |
| 48 | obj = test_pb2.MyObj() |
| 49 | obj.number = 9 |
| 50 | obj.name = 'USB' |
| 51 | async with session.post('http://127.0.0.1:8080/', data=obj.SerializeToString(), |
| 52 | headers={"content-type": "application/protobuf"}) as resp: |
| 53 | print(resp.status) |
| 54 | data = await resp.read() |
| 55 | receiveObj = test_pb2.MyObj() |
| 56 | receiveObj.ParseFromString(data) |
| 57 | print(receiveObj) |
| 58 | |
| 59 | async def go(loop): |
| 60 | obj = test_pb2.MyObj() |
no outgoing calls
no test coverage detected