Skip to content

Commit 656de6a

Browse files
committed
fix tests
1 parent 146db3a commit 656de6a

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

42.3 KB
Loading

samples/openapi3/client/petstore/python-httpx-sync/tests/test_pet_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def test_proxy(self):
227227

228228
with self.assertRaisesRegex(
229229
petstore_api.rest.httpx.ConnectError,
230-
"All connection attempts failed",
230+
"[Errno 111] Connection refused",
231231
):
232232
pet_api.get_pet_by_id(self.pet.id)
233233

samples/openapi3/client/petstore/python-httpx-sync/tests/test_rest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def setUp(self):
2020

2121
def test_multipart_requests(self):
2222
mock_resp = Mock()
23-
mock_resp.return_value.aread.return_value = b"some text"
23+
mock_resp.return_value.read.return_value = b"some text"
2424
mock_resp.return_value.status_code = 200
2525
mock_resp.return_value.headers = {}
2626

@@ -38,7 +38,7 @@ def test_multipart_requests(self):
3838
def test_multipart_requests_with_file_and_additional_properties(self):
3939
mock_resp = Mock()
4040
mock_resp.status_code = 200
41-
mock_resp.aread = Mock(
41+
mock_resp.read = Mock(
4242
return_value=b'{"code": 200, "type": "success", "message": "OK"}'
4343
)
4444
mock_resp.headers = {"Content-Type": "application/json"}

0 commit comments

Comments
 (0)