A server that implements a side effect to a non iterable action.
| 2549 | |
| 2550 | |
| 2551 | class ActionNoneFlightServer(EchoFlightServer): |
| 2552 | """A server that implements a side effect to a non iterable action.""" |
| 2553 | VALUES = [] |
| 2554 | |
| 2555 | def do_action(self, context, action): |
| 2556 | if action.type == "get_value": |
| 2557 | return [json.dumps(self.VALUES).encode('utf-8')] |
| 2558 | elif action.type == "append": |
| 2559 | self.VALUES.append(True) |
| 2560 | return None |
| 2561 | raise NotImplementedError |
| 2562 | |
| 2563 | |
| 2564 | def test_none_action_side_effect(): |
no outgoing calls