Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9c653ad

Browse files
committed
Fix test for python 3
1 parent 8e86cf0 commit 9c653ad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/unit/test_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,10 @@ def text(self):
255255
class MockPdfResponse(object):
256256
@property
257257
def status_code(self):
258-
import httplib
258+
try:
259+
import httplib # python 2
260+
except ImportError:
261+
import http.client as httplib # python 3
259262
return httplib.OK
260263

261264
@property

0 commit comments

Comments
 (0)