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

Function test_http_basic_auth_invalid_password

python/pyarrow/tests/test_flight.py:1632–1640  ·  view source on GitHub ↗

Test that auth fails with the wrong password.

()

Source from the content-addressed store, hash-verified

1630
1631
1632def test_http_basic_auth_invalid_password():
1633 """Test that auth fails with the wrong password."""
1634 with EchoStreamFlightServer(auth_handler=basic_auth_handler) as server, \
1635 FlightClient(('localhost', server.port)) as client:
1636 action = flight.Action("who-am-i", b"")
1637 with pytest.raises(flight.FlightUnauthenticatedError,
1638 match=".*wrong password.*"):
1639 client.authenticate(HttpBasicClientAuthHandler('test', 'wrong'))
1640 next(client.do_action(action))
1641
1642
1643def test_token_auth():

Callers

nothing calls this directly

Calls 5

FlightClientClass · 0.90
authenticateMethod · 0.45
do_actionMethod · 0.45

Tested by

no test coverage detected