MCPcopy Create free account
hub / github.com/apache/arrow / ActionNoneFlightServer

Class ActionNoneFlightServer

python/pyarrow/tests/test_flight.py:2551–2561  ·  view source on GitHub ↗

A server that implements a side effect to a non iterable action.

Source from the content-addressed store, hash-verified

2549
2550
2551class 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
2564def test_none_action_side_effect():

Callers 1

Calls

no outgoing calls

Tested by 1