|
5 | 5 | import uuid |
6 | 6 | from datetime import datetime, timedelta |
7 | 7 | from io import BytesIO |
8 | | -from typing import Optional, Any, Dict, Union, Iterator, Tuple |
| 8 | +from typing import Optional, Any, Dict, Union, Iterator |
9 | 9 |
|
10 | | -import pytest |
11 | 10 | from dateutil.tz import UTC |
12 | 11 | from requests import HTTPError |
13 | 12 |
|
14 | | -from azure.kusto.data import KustoConnectionStringBuilder |
15 | 13 | from azure.kusto.data._models import KustoResultRow, KustoResultTable, KustoStreamingResultTable |
16 | 14 | from azure.kusto.data.response import WellKnownDataSet, KustoStreamingResponseDataSet, KustoResponseDataSet |
17 | 15 |
|
@@ -135,43 +133,6 @@ def raise_for_status(self): |
135 | 133 | return MockResponse(None, 404, url) |
136 | 134 |
|
137 | 135 |
|
138 | | -@pytest.fixture( |
139 | | - params=[ |
140 | | - "user_password", |
141 | | - "application_key", |
142 | | - "application_token", |
143 | | - "device", |
144 | | - "user_token", |
145 | | - "managed_identity", |
146 | | - "token_provider", |
147 | | - "async_token_provider", |
148 | | - "az_cli", |
149 | | - "interactive_login", |
150 | | - ] |
151 | | -) |
152 | | -def proxy_kcsb(request) -> Tuple[KustoConnectionStringBuilder, bool]: |
153 | | - cluster = KustoClientTestsMixin.HOST |
154 | | - user = "test2" |
155 | | - password = "Pa$$w0rd2" |
156 | | - authority_id = "13456" |
157 | | - uuid = "11111111-1111-1111-1111-111111111111" |
158 | | - key = "key of application" |
159 | | - token = "The app hardest token ever" |
160 | | - |
161 | | - return { |
162 | | - "user_password": (KustoConnectionStringBuilder.with_aad_user_password_authentication(cluster, user, password, authority_id), True), |
163 | | - "application_key": (KustoConnectionStringBuilder.with_aad_application_key_authentication(cluster, uuid, key, "microsoft.com"), True), |
164 | | - "application_token": (KustoConnectionStringBuilder.with_aad_application_token_authentication(cluster, application_token=token), False), |
165 | | - "device": (KustoConnectionStringBuilder.with_aad_device_authentication(cluster), True), |
166 | | - "user_token": (KustoConnectionStringBuilder.with_aad_user_token_authentication(cluster, user_token=token), False), |
167 | | - "managed_identity": (KustoConnectionStringBuilder.with_aad_managed_service_identity_authentication(cluster), False), |
168 | | - "token_provider": (KustoConnectionStringBuilder.with_token_provider(cluster, lambda x: x), False), |
169 | | - "async_token_provider": (KustoConnectionStringBuilder.with_async_token_provider(cluster, lambda x: x), False), |
170 | | - "az_cli": (KustoConnectionStringBuilder.with_az_cli_authentication(cluster), True), |
171 | | - "interactive_login": (KustoConnectionStringBuilder.with_interactive_login(cluster), True), |
172 | | - }[request.param] |
173 | | - |
174 | | - |
175 | 136 | DIGIT_WORDS = [str("Zero"), str("One"), str("Two"), str("Three"), str("Four"), str("Five"), str("Six"), str("Seven"), str("Eight"), str("Nine"), str("ten")] |
176 | 137 |
|
177 | 138 | SyncResponseSet = Union[KustoStreamingResponseDataSet, KustoResponseDataSet] |
|
0 commit comments