Commit 560569fe authored by Denis Laxalde's avatar Denis Laxalde
Browse files

[test] Add a tox configuration

Which includes a lower bound for python-requests so that we can drop the
"skip" in tests. Also avoid usage of lgc.testlib.

Closes #17047815 by filling test dependencies in tox.ini.
parent d1c33da6b0a4
syntax: glob
......@@ -16,23 +16,15 @@
import json
import urlparse
import requests
from cubicweb.devtools.httptest import CubicWebServerTC
# ensure a recent request lib is available
import requests
assert [int(n) for n in requests.__version__.split('.', 2)][:2] >= [1, 2]
except (ImportError, AssertionError):
requests = None
class RqlIOTc(CubicWebServerTC):
class RqlIOTC(CubicWebServerTC):
def setUp(self):
"Skip whole test class if a suitable requests module is not available"
if requests is None:
self.skipTest('Python ``requests`` module is not available')
super(RqlIOTc, self).setUp()
def setup_database(self):
with self.admin_access.client_cnx() as cnx:
self.create_user(cnx, u'toto', password=u'toto')
......@@ -123,5 +115,5 @@ class RqlIOTc(CubicWebServerTC):
if __name__ == '__main__':
from logilab.common.testlib import unittest_main
import unittest
envlist = py27
deps =
Twisted < 16.0.0
commands =
{envpython} -m pytest test {posargs}
python_files = *test_*.py
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment