Make sure the return type of ListActions is validated.
()
| 1311 | |
| 1312 | |
| 1313 | def test_list_actions(): |
| 1314 | """Make sure the return type of ListActions is validated.""" |
| 1315 | # ARROW-6392 |
| 1316 | with ListActionsErrorFlightServer() as server, \ |
| 1317 | FlightClient(('localhost', server.port)) as client: |
| 1318 | with pytest.raises( |
| 1319 | flight.FlightServerError, |
| 1320 | match=("Results of list_actions must be " |
| 1321 | "ActionType or tuple") |
| 1322 | ): |
| 1323 | list(client.list_actions()) |
| 1324 | |
| 1325 | with ListActionsFlightServer() as server, \ |
| 1326 | FlightClient(('localhost', server.port)) as client: |
| 1327 | assert list(client.list_actions()) == \ |
| 1328 | ListActionsFlightServer.expected_actions() |
| 1329 | |
| 1330 | |
| 1331 | class ConvenienceServer(FlightServerBase): |
nothing calls this directly
no test coverage detected