PageRenderTime 49ms CodeModel.GetById 46ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/web/helpers.py

https://bitbucket.org/prologic/circuits/
Python | 24 lines | 20 code | 3 blank | 1 comment | 0 complexity | a7ae684a868c8d67370022996c28e145 MD5 | raw file
 1try:
 2    from urllib.error import HTTPError, URLError
 3    from urllib.parse import quote, urlencode, urljoin
 4    from urllib.request import HTTPBasicAuthHandler, HTTPCookieProcessor
 5    from urllib.request import urlopen, build_opener, install_opener
 6    from urllib.request import HTTPDigestAuthHandler, Request
 7except ImportError:
 8    from urlparse import urljoin
 9    from urllib import quote, urlencode
10    from urllib2 import HTTPError, URLError, HTTPDigestAuthHandler
11    from urllib2 import HTTPBasicAuthHandler, HTTPCookieProcessor
12    from urllib2 import urlopen, build_opener, install_opener, Request
13
14try:
15    from http.cookiejar import CookieJar
16except ImportError:
17    from cookielib import CookieJar
18
19try:
20    from urllib.parse import urlparse
21except ImportError:
22    from urlparse import urlparse
23
24# pylama:skip=1