[Python-modules-commits] [python-restless] 03/07: fix test fail
Wolfgang Borgert
debacle at moszumanska.debian.org
Mon Dec 26 03:21:02 UTC 2016
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository python-restless.
commit 7a2742ece40f1014a0093ba37a7f0ca4cc715b2a
Author: mission-liao <missionaryliao at gmail.com>
Date: Fri Nov 27 16:56:03 2015 +0800
fix test fail
after tornado 4.0, we need to provide a connection when faking a request
- and a context object for 4.0.1/4.0.2
---
tests/test_tnd.py | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/tests/test_tnd.py b/tests/test_tnd.py
index 3d53f06..9f0ccde 100644
--- a/tests/test_tnd.py
+++ b/tests/test_tnd.py
@@ -17,6 +17,27 @@ def _newer_or_equal_(v):
return False
return True
+def _equal_(v):
+ for i in six.moves.xrange(min(len(v), len(version_info))):
+ if v[i] != version_info[i]:
+ return False
+ return True
+
+
+if _newer_or_equal_((4, 0, 0, 0)):
+ from tornado.http1connection import HTTP1Connection
+
+def _newer_or_equal_(v):
+ for i in six.moves.xrange(min(len(v), len(version_info))):
+ expected, tnd = v[i], version_info[i]
+ if tnd > expected:
+ return True
+ elif tnd == expected:
+ continue
+ else:
+ return False
+ return True
+
def _equal_(v):
for i in six.moves.xrange(min(len(v), len(version_info))):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-restless.git
More information about the Python-modules-commits
mailing list