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

Function test_tls_override_hostname

python/pyarrow/tests/test_flight.py:1781–1790  ·  view source on GitHub ↗

Check that incorrectly overriding the hostname fails.

()

Source from the content-addressed store, hash-verified

1779
1780@pytest.mark.requires_testing_data
1781def test_tls_override_hostname():
1782 """Check that incorrectly overriding the hostname fails."""
1783 certs = example_tls_certs()
1784
1785 with ConstantFlightServer(tls_certificates=certs["certificates"]) as s, \
1786 flight.connect(('localhost', s.port),
1787 tls_root_certs=certs["root_cert"],
1788 override_hostname="fakehostname") as client:
1789 with pytest.raises(flight.FlightUnavailableError):
1790 client.do_get(flight.Ticket(b'ints'))
1791
1792
1793def 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