A Flight server that tests ListActions.
| 310 | |
| 311 | |
| 312 | class ListActionsFlightServer(FlightServerBase): |
| 313 | """A Flight server that tests ListActions.""" |
| 314 | |
| 315 | @classmethod |
| 316 | def expected_actions(cls): |
| 317 | return [ |
| 318 | ("action-1", "description"), |
| 319 | ("action-2", ""), |
| 320 | flight.ActionType("action-3", "more detail"), |
| 321 | ] |
| 322 | |
| 323 | def list_actions(self, context): |
| 324 | yield from self.expected_actions() |
| 325 | |
| 326 | |
| 327 | class ListActionsErrorFlightServer(FlightServerBase): |
no outgoing calls