|
15 | 15 | import urllib
|
16 | 16 | import uuid
|
17 | 17 | from contextlib import nullcontext as does_not_raise
|
18 |
| -from typing import Any, Dict, Optional |
19 |
| -from unittest import TestCase, mock |
| 18 | +from typing import Any |
| 19 | +from typing import Dict |
| 20 | +from typing import Optional |
| 21 | +from unittest import mock |
| 22 | +from unittest import TestCase |
20 | 23 | from urllib.parse import urlparse
|
21 | 24 | from zoneinfo import ZoneInfoNotFoundError
|
22 | 25 |
|
|
31 | 34 | from tzlocal import get_localzone_name # type: ignore
|
32 | 35 |
|
33 | 36 | import trino.exceptions
|
34 |
| -from tests.unit.oauth_test_utils import ( |
35 |
| - REDIRECT_RESOURCE, |
36 |
| - SERVER_ADDRESS, |
37 |
| - TOKEN_RESOURCE, |
38 |
| - GetTokenCallback, |
39 |
| - MultithreadedTokenServer, |
40 |
| - PostStatementCallback, |
41 |
| - RedirectHandler, |
42 |
| - RedirectHandlerWithException, |
43 |
| - _get_token_requests, |
44 |
| - _post_statement_requests, |
45 |
| -) |
46 |
| -from trino import __version__, constants |
47 |
| -from trino.auth import ( |
48 |
| - GSSAPIAuthentication, |
49 |
| - KerberosAuthentication, |
50 |
| - _OAuth2KeyRingTokenCache, |
51 |
| - _OAuth2TokenBearer, |
52 |
| -) |
53 |
| -from trino.client import ( |
54 |
| - ClientSession, |
55 |
| - TrinoQuery, |
56 |
| - TrinoRequest, |
57 |
| - TrinoResult, |
58 |
| - _DelayExponential, |
59 |
| - _retry_with, |
60 |
| - _RetryWithExponentialBackoff, |
61 |
| -) |
| 37 | +from tests.unit.oauth_test_utils import _get_token_requests |
| 38 | +from tests.unit.oauth_test_utils import _post_statement_requests |
| 39 | +from tests.unit.oauth_test_utils import GetTokenCallback |
| 40 | +from tests.unit.oauth_test_utils import MultithreadedTokenServer |
| 41 | +from tests.unit.oauth_test_utils import PostStatementCallback |
| 42 | +from tests.unit.oauth_test_utils import REDIRECT_RESOURCE |
| 43 | +from tests.unit.oauth_test_utils import RedirectHandler |
| 44 | +from tests.unit.oauth_test_utils import RedirectHandlerWithException |
| 45 | +from tests.unit.oauth_test_utils import SERVER_ADDRESS |
| 46 | +from tests.unit.oauth_test_utils import TOKEN_RESOURCE |
| 47 | +from trino import __version__ |
| 48 | +from trino import constants |
| 49 | +from trino.auth import _OAuth2KeyRingTokenCache |
| 50 | +from trino.auth import _OAuth2TokenBearer |
| 51 | +from trino.auth import GSSAPIAuthentication |
| 52 | +from trino.auth import KerberosAuthentication |
| 53 | +from trino.client import _DelayExponential |
| 54 | +from trino.client import _retry_with |
| 55 | +from trino.client import _RetryWithExponentialBackoff |
| 56 | +from trino.client import ClientSession |
| 57 | +from trino.client import TrinoQuery |
| 58 | +from trino.client import TrinoRequest |
| 59 | +from trino.client import TrinoResult |
62 | 60 |
|
63 | 61 |
|
64 | 62 | @mock.patch("trino.client.TrinoRequest.http")
|
|
0 commit comments