Skip to content

Commit d0ca815

Browse files
author
anentropic
authored
Merge pull request #15 from depop/update-deps
actually update the deps in setup.py :(
2 parents 7d34dec + 6589cb8 commit d0ca815

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: pypi tag mypy pytest test
1+
.PHONY: pypi tag mypy pytest pytest-pdb test
22

33
pypi:
44
rm -f dist/*
@@ -14,6 +14,9 @@ mypy:
1414
mypy --py2 --ignore-missing-imports popget
1515

1616
pytest:
17+
py.test -v -s tests/
18+
19+
pytest-pdb:
1720
py.test -v -s --ipdb tests/
1821

1922
test:

popget/__about__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.8.2'
1+
__version__ = '1.8.3'

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
'six',
5050
'enum34>=1.1.6,<2.0.0; python_version < "3.4"',
5151
'futures>=3.1.1,<3.2.0; python_version < "3.2"',
52-
'mypy_extensions==0.3.0',
52+
'mypy_extensions>=0.3,<0.5',
5353
],
5454
extras_require={
5555
'threadpool': ['requests-futures>=0.9.7,<1.0.0'],

tests/test_client.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from six.moves.urllib import parse as urlparse
22

33
from flexisettings.utils import override_settings
4+
from urllib3.exceptions import ConnectTimeoutError
45
import pytest
56
import requests
67
import responses
@@ -504,13 +505,20 @@ def callback(request):
504505
assert len(responses.calls) == 1
505506

506507

507-
@override_settings(settings, CLIENT_TIMEOUT=0.000001)
508+
class TimeoutService(DummyService):
509+
510+
class Config:
511+
# (psf/requests uses this for its timeout test)
512+
base_url = 'http://10.255.255.1/'
513+
514+
515+
@override_settings(settings, CLIENT_TIMEOUT=1)
508516
def test_timeout():
509517
"""
510518
Test APIClient behaviour when the requests library timeout threshold is reached
511519
"""
512520
with pytest.raises(requests.exceptions.HTTPError) as exc_info:
513-
DummyService.thing_detail(id=777)
521+
TimeoutService.thing_detail(id=777)
514522

515523
e = exc_info.value
516524
assert e.response.status_code == 504

0 commit comments

Comments
 (0)