Skip to content

Commit 7c65767

Browse files
takutiggreg
authored andcommitted
Pass auth module to PrestoRequest for testing auth fail
1 parent 4ebeb58 commit 7c65767

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
from requests_kerberos.exceptions import KerberosExchangeError
2323
from prestodb.client import PrestoRequest
24+
from prestodb.auth import KerberosAuthentication
2425
from prestodb import constants
2526
import prestodb.exceptions
2627

@@ -511,10 +512,13 @@ def test_authentication_fail_retry(monkeypatch):
511512
monkeypatch.setattr(PrestoRequest.http.Session, 'get', get_retry)
512513

513514
attempts = 3
515+
kerberos_auth = KerberosAuthentication()
514516
req = PrestoRequest(
515517
host='coordinator',
516518
port=8080,
517519
user='test',
520+
http_scheme=constants.HTTPS,
521+
auth=kerberos_auth,
518522
max_attempts=attempts,
519523
)
520524

0 commit comments

Comments
 (0)