Make sure FlightEndpoint accepts string and object URIs.
()
| 1242 | |
| 1243 | |
| 1244 | def test_flight_get_info(): |
| 1245 | """Make sure FlightEndpoint accepts string and object URIs.""" |
| 1246 | with GetInfoFlightServer() as server: |
| 1247 | client = FlightClient(('localhost', server.port)) |
| 1248 | info = client.get_flight_info(flight.FlightDescriptor.for_command(b'')) |
| 1249 | assert info.total_records == 1 |
| 1250 | assert info.total_bytes == 42 |
| 1251 | assert info.ordered |
| 1252 | assert info.app_metadata == b"info app metadata" |
| 1253 | assert info.schema == pa.schema([('a', pa.int32())]) |
| 1254 | assert len(info.endpoints) == 2 |
| 1255 | assert len(info.endpoints[0].locations) == 1 |
| 1256 | assert info.endpoints[0].expiration_time is None |
| 1257 | assert info.endpoints[0].app_metadata == b"" |
| 1258 | assert info.endpoints[0].locations[0] == flight.Location('grpc://test') |
| 1259 | assert info.endpoints[1].expiration_time == \ |
| 1260 | pa.scalar("2023-04-05T12:34:56.789012345+00:00") \ |
| 1261 | .cast(pa.timestamp("ns", "UTC")) |
| 1262 | assert info.endpoints[1].app_metadata == b"endpoint app metadata" |
| 1263 | assert info.endpoints[1].locations[0] == \ |
| 1264 | flight.Location.for_grpc_tcp('localhost', 5005) |
| 1265 | |
| 1266 | |
| 1267 | def test_flight_get_schema(): |
nothing calls this directly
no test coverage detected