Skip to content

Commit a24b260

Browse files
committed
httpclient_test: Accept an additional error message variant
This appears to be a recent libcurl change.
1 parent a74240a commit a24b260

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎tornado/test/httpclient_test.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,10 @@ def test_bind_source_ip(self):
640640
with self.assertRaises((ValueError, HTTPError)) as context: # type: ignore
641641
request = HTTPRequest(url, network_interface="not-interface-or-ip")
642642
yield self.http_client.fetch(request)
643-
self.assertIn("not-interface-or-ip", str(context.exception))
643+
self.assertTrue(
644+
"not-interface-or-ip" in str(context.exception)
645+
or "Failed binding local connection end" in str(context.exception)
646+
)
644647

645648
def test_all_methods(self):
646649
for method in ["GET", "DELETE", "OPTIONS"]:

0 commit comments

Comments
 (0)