Make sure FlightEndpoint accepts string and object URIs.
()
| 1280 | |
| 1281 | |
| 1282 | def test_flight_get_info(): |
| 1283 | """Make sure FlightEndpoint accepts string and object URIs.""" |
| 1284 | with GetInfoFlightServer() as server: |
| 1285 | client = FlightClient(('localhost', server.port)) |
| 1286 | info = client.get_flight_info(flight.FlightDescriptor.for_command(b'')) |
| 1287 | assert info.total_records == 1 |
| 1288 | assert info.total_bytes == 42 |
| 1289 | assert info.ordered |
| 1290 | assert info.app_metadata == b"info app metadata" |
| 1291 | assert info.schema == pa.schema([('a', pa.int32())]) |
| 1292 | assert len(info.endpoints) == 2 |
| 1293 | assert len(info.endpoints[0].locations) == 1 |
| 1294 | assert info.endpoints[0].expiration_time is None |
| 1295 | assert info.endpoints[0].app_metadata == b"" |
| 1296 | assert info.endpoints[0].locations[0] == flight.Location('grpc://test') |
| 1297 | assert info.endpoints[1].expiration_time == \ |
| 1298 | pa.scalar("2023-04-05T12:34:56.789012345+00:00") \ |
| 1299 | .cast(pa.timestamp("ns", "UTC")) |
| 1300 | assert info.endpoints[1].app_metadata == b"endpoint app metadata" |
| 1301 | assert info.endpoints[1].locations[0] == \ |
| 1302 | flight.Location.for_grpc_tcp('localhost', 5005) |
| 1303 | |
| 1304 | |
| 1305 | def test_flight_get_schema(): |
nothing calls this directly
no test coverage detected