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

Function test_tls_override_hostname

python/pyarrow/tests/test_flight.py:1819–1828  ·  view source on GitHub ↗

Check that incorrectly overriding the hostname fails.

()

Source from the content-addressed store, hash-verified

1817
1818@pytest.mark.requires_testing_data
1819def test_tls_override_hostname():
1820 """Check that incorrectly overriding the hostname fails."""
1821 certs = example_tls_certs()
1822
1823 with ConstantFlightServer(tls_certificates=certs["certificates"]) as s, \
1824 flight.connect(('localhost', s.port),
1825 tls_root_certs=certs["root_cert"],
1826 override_hostname="fakehostname") as client:
1827 with pytest.raises(flight.FlightUnavailableError):
1828 client.do_get(flight.Ticket(b'ints'))
1829
1830
1831def test_flight_do_get_metadata():

Callers

nothing calls this directly

Calls 3

example_tls_certsFunction · 0.85
do_getMethod · 0.45

Tested by

no test coverage detected