File tree 4 files changed +16
-5
lines changed
4 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 1
- .PHONY : pypi tag mypy pytest test
1
+ .PHONY : pypi tag mypy pytest pytest-pdb test
2
2
3
3
pypi :
4
4
rm -f dist/*
14
14
mypy --py2 --ignore-missing-imports popget
15
15
16
16
pytest :
17
+ py.test -v -s tests/
18
+
19
+ pytest-pdb :
17
20
py.test -v -s --ipdb tests/
18
21
19
22
test :
Original file line number Diff line number Diff line change 1
- __version__ = '1.8.2 '
1
+ __version__ = '1.8.3 '
Original file line number Diff line number Diff line change 49
49
'six' ,
50
50
'enum34>=1.1.6,<2.0.0; python_version < "3.4"' ,
51
51
'futures>=3.1.1,<3.2.0; python_version < "3.2"' ,
52
- 'mypy_extensions== 0.3.0 ' ,
52
+ 'mypy_extensions>= 0.3,<0.5 ' ,
53
53
],
54
54
extras_require = {
55
55
'threadpool' : ['requests-futures>=0.9.7,<1.0.0' ],
Original file line number Diff line number Diff line change 1
1
from six .moves .urllib import parse as urlparse
2
2
3
3
from flexisettings .utils import override_settings
4
+ from urllib3 .exceptions import ConnectTimeoutError
4
5
import pytest
5
6
import requests
6
7
import responses
@@ -504,13 +505,20 @@ def callback(request):
504
505
assert len (responses .calls ) == 1
505
506
506
507
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 )
508
516
def test_timeout ():
509
517
"""
510
518
Test APIClient behaviour when the requests library timeout threshold is reached
511
519
"""
512
520
with pytest .raises (requests .exceptions .HTTPError ) as exc_info :
513
- DummyService .thing_detail (id = 777 )
521
+ TimeoutService .thing_detail (id = 777 )
514
522
515
523
e = exc_info .value
516
524
assert e .response .status_code == 504
You can’t perform that action at this time.
0 commit comments