enabling test_web tests in travis, thanks Niphlod
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.4.5-stable+timestamp.2013.03.21.12.03.58
|
||||
Version 2.4.5-stable+timestamp.2013.03.21.15.09.50
|
||||
|
||||
@@ -15,12 +15,12 @@ mostly for testing purposes
|
||||
|
||||
Some examples at the bottom.
|
||||
"""
|
||||
|
||||
import re
|
||||
import time
|
||||
import urllib
|
||||
import urllib2
|
||||
|
||||
|
||||
DEFAULT_HEADERS = {
|
||||
'user-agent': 'Mozilla/4.0', # some servers are picky
|
||||
'accept-language': 'en',
|
||||
@@ -126,7 +126,11 @@ class WebClient(object):
|
||||
self.time = time.time() - t0
|
||||
self.response = error
|
||||
|
||||
self.status = self.response.getcode()
|
||||
if hasattr(self.response, 'getcode'):
|
||||
self.status = self.response.getcode()
|
||||
else:#python2.5
|
||||
self.status = None
|
||||
|
||||
self.text = self.response.read()
|
||||
self.headers = dict(self.response.headers)
|
||||
|
||||
|
||||
@@ -10,4 +10,4 @@ from test_template import *
|
||||
from test_utils import *
|
||||
from test_contribs import *
|
||||
from test_markmin import *
|
||||
# from test_web import *
|
||||
from test_web import *
|
||||
|
||||
Reference in New Issue
Block a user