Skip to content

Commit

Permalink
test: Expect urllib3.exceptions.NewConnectionError in `assert_reque…
Browse files Browse the repository at this point in the history
…sts_call`

It happens not each call, but may randomly appear
  • Loading branch information
Stranger6667 committed Nov 13, 2020
1 parent b7a187e commit 6d361cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import click
import pytest
import requests
import urllib3
import yaml

import schemathesis
Expand Down Expand Up @@ -117,7 +118,7 @@ def assert_datetime(value: str) -> bool:

def assert_requests_call(case: Case):
"""Verify that all generated input parameters are usable by requests."""
with pytest.raises(requests.exceptions.ConnectionError):
with pytest.raises((requests.exceptions.ConnectionError, urllib3.exceptions.NewConnectionError)):
case.call(base_url="http://127.0.0.1:1")


Expand Down

0 comments on commit 6d361cc

Please sign in to comment.