[PATCH 1 of 6 rqlcontroller] [test] Use a WSGI cubicweb server

Denis Laxalde denis.laxalde at logilab.fr
Mon Jun 4 14:28:40 CEST 2018


# HG changeset patch
# User Denis Laxalde <denis.laxalde at logilab.fr>
# Date 1528108839 -7200
#      Mon Jun 04 12:40:39 2018 +0200
# Node ID bdb6d3df38cb48c8b77008868caf415a840155b1
# Parent  4b8a7b178b8644e40a1c5f6636c25b9576a673bf
# Available At http://hg.logilab.org/review/cubes/rqlcontroller
#              hg pull http://hg.logilab.org/review/cubes/rqlcontroller -r bdb6d3df38cb
# EXP-Topic py3
[test] Use a WSGI cubicweb server

We replace CubicWebServerTC, which uses Twisted, by CubicWebWsgiTC.
In particular, the latter will work on Python 3 whereas this is not
supported in the former.

diff --git a/test/unittest_rqlcontroller.py b/test/unittest_rqlcontroller.py
--- a/test/unittest_rqlcontroller.py
+++ b/test/unittest_rqlcontroller.py
@@ -18,10 +18,10 @@ import json
 import urlparse
 import requests
 
-from cubicweb.devtools.httptest import CubicWebServerTC
+from cubicweb.devtools.httptest import CubicWebWsgiTC
 
 
-class RqlIOTC(CubicWebServerTC):
+class RqlIOTC(CubicWebWsgiTC):
 
     def setup_database(self):
         with self.admin_access.client_cnx() as cnx:
diff --git a/tox.ini b/tox.ini
--- a/tox.ini
+++ b/tox.ini
@@ -5,7 +5,6 @@ envlist = py27,flake8
 deps =
   pytest
   requests>=1.2
-  Twisted < 16.0.0
 commands =
   {envpython} -m pytest test {posargs}
 


More information about the cubicweb-devel mailing list