Skip to content

Commit b6b5896

Browse files
authored
fix: SSL verify argument to async clients [#533 & #510]. Thanks @fsvenson and @mvaught02!
1 parent aa4f6b5 commit b6b5896

26 files changed

+52
-52
lines changed

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/default/get_common_parameters.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def _get_kwargs(
2727
"cookies": cookies,
2828
"timeout": client.get_timeout(),
2929
"params": params,
30-
"verify": client.verify_ssl,
3130
}
3231

3332

@@ -51,6 +50,7 @@ def sync_detailed(
5150
)
5251

5352
response = httpx.get(
53+
verify=client.verify_ssl,
5454
**kwargs,
5555
)
5656

@@ -67,7 +67,7 @@ async def asyncio_detailed(
6767
common=common,
6868
)
6969

70-
async with httpx.AsyncClient() as _client:
70+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
7171
response = await _client.get(**kwargs)
7272

7373
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/default/post_common_parameters.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def _get_kwargs(
2727
"cookies": cookies,
2828
"timeout": client.get_timeout(),
2929
"params": params,
30-
"verify": client.verify_ssl,
3130
}
3231

3332

@@ -51,6 +50,7 @@ def sync_detailed(
5150
)
5251

5352
response = httpx.post(
53+
verify=client.verify_ssl,
5454
**kwargs,
5555
)
5656

@@ -67,7 +67,7 @@ async def asyncio_detailed(
6767
common=common,
6868
)
6969

70-
async with httpx.AsyncClient() as _client:
70+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
7171
response = await _client.post(**kwargs)
7272

7373
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/location/get_location_query_optionality.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def _get_kwargs(
4848
"cookies": cookies,
4949
"timeout": client.get_timeout(),
5050
"params": params,
51-
"verify": client.verify_ssl,
5251
}
5352

5453

@@ -78,6 +77,7 @@ def sync_detailed(
7877
)
7978

8079
response = httpx.get(
80+
verify=client.verify_ssl,
8181
**kwargs,
8282
)
8383

@@ -100,7 +100,7 @@ async def asyncio_detailed(
100100
not_null_not_required=not_null_not_required,
101101
)
102102

103-
async with httpx.AsyncClient() as _client:
103+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
104104
response = await _client.get(**kwargs)
105105

106106
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/parameters/delete_common_parameters_overriding_param.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def _get_kwargs(
2828
"cookies": cookies,
2929
"timeout": client.get_timeout(),
3030
"params": params,
31-
"verify": client.verify_ssl,
3231
}
3332

3433

@@ -54,6 +53,7 @@ def sync_detailed(
5453
)
5554

5655
response = httpx.delete(
56+
verify=client.verify_ssl,
5757
**kwargs,
5858
)
5959

@@ -72,7 +72,7 @@ async def asyncio_detailed(
7272
param_query=param_query,
7373
)
7474

75-
async with httpx.AsyncClient() as _client:
75+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
7676
response = await _client.delete(**kwargs)
7777

7878
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/parameters/get_common_parameters_overriding_param.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def _get_kwargs(
2828
"cookies": cookies,
2929
"timeout": client.get_timeout(),
3030
"params": params,
31-
"verify": client.verify_ssl,
3231
}
3332

3433

@@ -54,6 +53,7 @@ def sync_detailed(
5453
)
5554

5655
response = httpx.get(
56+
verify=client.verify_ssl,
5757
**kwargs,
5858
)
5959

@@ -72,7 +72,7 @@ async def asyncio_detailed(
7272
param_query=param_query,
7373
)
7474

75-
async with httpx.AsyncClient() as _client:
75+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
7676
response = await _client.get(**kwargs)
7777

7878
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/parameters/get_same_name_multiple_locations_param.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def _get_kwargs(
3636
"cookies": cookies,
3737
"timeout": client.get_timeout(),
3838
"params": params,
39-
"verify": client.verify_ssl,
4039
}
4140

4241

@@ -66,6 +65,7 @@ def sync_detailed(
6665
)
6766

6867
response = httpx.get(
68+
verify=client.verify_ssl,
6969
**kwargs,
7070
)
7171

@@ -88,7 +88,7 @@ async def asyncio_detailed(
8888
param_cookie=param_cookie,
8989
)
9090

91-
async with httpx.AsyncClient() as _client:
91+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
9292
response = await _client.get(**kwargs)
9393

9494
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/parameters/multiple_path_parameters.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def _get_kwargs(
2626
"headers": headers,
2727
"cookies": cookies,
2828
"timeout": client.get_timeout(),
29-
"verify": client.verify_ssl,
3029
}
3130

3231

@@ -56,6 +55,7 @@ def sync_detailed(
5655
)
5756

5857
response = httpx.get(
58+
verify=client.verify_ssl,
5959
**kwargs,
6060
)
6161

@@ -78,7 +78,7 @@ async def asyncio_detailed(
7878
client=client,
7979
)
8080

81-
async with httpx.AsyncClient() as _client:
81+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
8282
response = await _client.get(**kwargs)
8383

8484
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/tag1/get_tag_with_number.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def _get_kwargs(
2020
"headers": headers,
2121
"cookies": cookies,
2222
"timeout": client.get_timeout(),
23-
"verify": client.verify_ssl,
2423
}
2524

2625

@@ -42,6 +41,7 @@ def sync_detailed(
4241
)
4342

4443
response = httpx.get(
44+
verify=client.verify_ssl,
4545
**kwargs,
4646
)
4747

@@ -56,7 +56,7 @@ async def asyncio_detailed(
5656
client=client,
5757
)
5858

59-
async with httpx.AsyncClient() as _client:
59+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
6060
response = await _client.get(**kwargs)
6161

6262
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/tests/defaults_tests_defaults_post.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ def _get_kwargs(
8080
"cookies": cookies,
8181
"timeout": client.get_timeout(),
8282
"params": params,
83-
"verify": client.verify_ssl,
8483
}
8584

8685

@@ -136,6 +135,7 @@ def sync_detailed(
136135
)
137136

138137
response = httpx.post(
138+
verify=client.verify_ssl,
139139
**kwargs,
140140
)
141141

@@ -205,7 +205,7 @@ async def asyncio_detailed(
205205
required_model_prop=required_model_prop,
206206
)
207207

208-
async with httpx.AsyncClient() as _client:
208+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
209209
response = await _client.post(**kwargs)
210210

211211
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_booleans.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def _get_kwargs(
2020
"headers": headers,
2121
"cookies": cookies,
2222
"timeout": client.get_timeout(),
23-
"verify": client.verify_ssl,
2423
}
2524

2625

@@ -50,6 +49,7 @@ def sync_detailed(
5049
)
5150

5251
response = httpx.get(
52+
verify=client.verify_ssl,
5353
**kwargs,
5454
)
5555

@@ -75,7 +75,7 @@ async def asyncio_detailed(
7575
client=client,
7676
)
7777

78-
async with httpx.AsyncClient() as _client:
78+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
7979
response = await _client.get(**kwargs)
8080

8181
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_floats.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def _get_kwargs(
2020
"headers": headers,
2121
"cookies": cookies,
2222
"timeout": client.get_timeout(),
23-
"verify": client.verify_ssl,
2423
}
2524

2625

@@ -50,6 +49,7 @@ def sync_detailed(
5049
)
5150

5251
response = httpx.get(
52+
verify=client.verify_ssl,
5353
**kwargs,
5454
)
5555

@@ -75,7 +75,7 @@ async def asyncio_detailed(
7575
client=client,
7676
)
7777

78-
async with httpx.AsyncClient() as _client:
78+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
7979
response = await _client.get(**kwargs)
8080

8181
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_integers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def _get_kwargs(
2020
"headers": headers,
2121
"cookies": cookies,
2222
"timeout": client.get_timeout(),
23-
"verify": client.verify_ssl,
2423
}
2524

2625

@@ -50,6 +49,7 @@ def sync_detailed(
5049
)
5150

5251
response = httpx.get(
52+
verify=client.verify_ssl,
5353
**kwargs,
5454
)
5555

@@ -75,7 +75,7 @@ async def asyncio_detailed(
7575
client=client,
7676
)
7777

78-
async with httpx.AsyncClient() as _client:
78+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
7979
response = await _client.get(**kwargs)
8080

8181
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/tests/get_basic_list_of_strings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def _get_kwargs(
2020
"headers": headers,
2121
"cookies": cookies,
2222
"timeout": client.get_timeout(),
23-
"verify": client.verify_ssl,
2423
}
2524

2625

@@ -50,6 +49,7 @@ def sync_detailed(
5049
)
5150

5251
response = httpx.get(
52+
verify=client.verify_ssl,
5353
**kwargs,
5454
)
5555

@@ -75,7 +75,7 @@ async def asyncio_detailed(
7575
client=client,
7676
)
7777

78-
async with httpx.AsyncClient() as _client:
78+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
7979
response = await _client.get(**kwargs)
8080

8181
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/tests/get_user_list.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ def _get_kwargs(
5959
"cookies": cookies,
6060
"timeout": client.get_timeout(),
6161
"params": params,
62-
"verify": client.verify_ssl,
6362
}
6463

6564

@@ -110,6 +109,7 @@ def sync_detailed(
110109
)
111110

112111
response = httpx.get(
112+
verify=client.verify_ssl,
113113
**kwargs,
114114
)
115115

@@ -151,7 +151,7 @@ async def asyncio_detailed(
151151
some_date=some_date,
152152
)
153153

154-
async with httpx.AsyncClient() as _client:
154+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
155155
response = await _client.get(**kwargs)
156156

157157
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/tests/int_enum_tests_int_enum_post.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def _get_kwargs(
3131
"cookies": cookies,
3232
"timeout": client.get_timeout(),
3333
"params": params,
34-
"verify": client.verify_ssl,
3534
}
3635

3736

@@ -67,6 +66,7 @@ def sync_detailed(
6766
)
6867

6968
response = httpx.post(
69+
verify=client.verify_ssl,
7070
**kwargs,
7171
)
7272

@@ -96,7 +96,7 @@ async def asyncio_detailed(
9696
int_enum=int_enum,
9797
)
9898

99-
async with httpx.AsyncClient() as _client:
99+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
100100
response = await _client.post(**kwargs)
101101

102102
return _build_response(response=response)

Diff for: end_to_end_tests/golden-record/my_test_api_client/api/tests/json_body_tests_json_body_post.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def _get_kwargs(
2626
"cookies": cookies,
2727
"timeout": client.get_timeout(),
2828
"json": json_json_body,
29-
"verify": client.verify_ssl,
3029
}
3130

3231

@@ -62,6 +61,7 @@ def sync_detailed(
6261
)
6362

6463
response = httpx.post(
64+
verify=client.verify_ssl,
6565
**kwargs,
6666
)
6767

@@ -91,7 +91,7 @@ async def asyncio_detailed(
9191
json_body=json_body,
9292
)
9393

94-
async with httpx.AsyncClient() as _client:
94+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
9595
response = await _client.post(**kwargs)
9696

9797
return _build_response(response=response)

0 commit comments

Comments
 (0)