Commit 659ce518 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

[test] avoid obscure py.test failure with cw < 3.21

parent 1c130ec00c1e
......@@ -20,7 +20,7 @@ from StringIO import StringIO
from logilab.common.testlib import require_module
from cubicweb.devtools.testlib import CubicWebTC
from cubicweb.devtools import testlib
from cubes.skos.entities import CSVIndentationError, CSVDecodeError
from cubes.skos.rdfio import (TYPE_PREDICATE_URI, RDFLibRDFGraph, LibRDFRDFGraph,
......@@ -46,7 +46,7 @@ def build_result_dict(scheme):
return result
class ConceptSchemeTC(CubicWebTC):
class ConceptSchemeTC(testlib.CubicWebTC):
def test_top_concepts(self):
with self.admin_access.client_cnx() as cnx:
......@@ -227,7 +227,7 @@ class ConceptSchemeTC(CubicWebTC):
self.assertEqual(result, expected)
class ConceptTC(CubicWebTC):
class ConceptTC(testlib.CubicWebTC):
def setUp(self):
super(ConceptTC, self).setUp()
with self.admin_access.client_cnx() as cnx:
......@@ -280,7 +280,7 @@ def require_lib(lib):
return decorator
class RDFAdaptersTC(CubicWebTC):
class RDFAdaptersTC(testlib.CubicWebTC):
def setup_database(self):
with self.admin_access.client_cnx() as cnx:
......
......@@ -16,10 +16,10 @@
"""cubicweb-skos unit tests for hooks"""
from yams import ValidationError
from cubicweb.devtools.testlib import CubicWebTC
from cubicweb.devtools import testlib
class HooksTC(CubicWebTC):
class HooksTC(testlib.CubicWebTC):
def test_externaluri_to_concept(self):
with self.admin_access.repo_cnx() as cnx:
......
......@@ -20,7 +20,7 @@ from tempfile import NamedTemporaryFile
from logilab.common.testlib import TestCase, require_module
from cubicweb.devtools.testlib import CubicWebTC
from cubicweb.devtools import testlib
from cubes.skos.rdfio import *
from cubes.skos.rdfio import unicode_with_language as ul
......@@ -304,7 +304,7 @@ class RDFGraphToEntitiesTC(TestCase):
})
class AddEntitiesToRDFGraphTC(CubicWebTC):
class AddEntitiesToRDFGraphTC(testlib.CubicWebTC):
@require_module('rdflib')
def test_rdflib(self):
......
......@@ -16,12 +16,12 @@
"""cubicweb-skos sobjects tests"""
from cubicweb import Unauthorized
from cubicweb.devtools.testlib import CubicWebTC
from cubicweb.devtools import testlib
from unittest_sobjects import silent_logging
class SKOSSchemaTC(CubicWebTC):
class SKOSSchemaTC(testlib.CubicWebTC):
def test_concept_label_no_language(self):
with self.admin_access.repo_cnx() as cnx:
......
......@@ -18,7 +18,7 @@
import logging
from contextlib import contextmanager
from cubicweb.devtools.testlib import CubicWebTC
from cubicweb.devtools import testlib
@contextmanager
......@@ -30,7 +30,7 @@ def silent_logging(logger=None):
logger.setLevel(prev_level)
class DumpRelationsTC(CubicWebTC):
class DumpRelationsTC(testlib.CubicWebTC):
def test(self):
from cubes.skos.sobjects import dump_relations
with self.admin_access.client_cnx() as cnx:
......@@ -45,7 +45,7 @@ class DumpRelationsTC(CubicWebTC):
(concept.preferred_label[0].eid, 'label_of', None)])
class SKOSXMLImportTC(CubicWebTC):
class SKOSXMLImportTC(testlib.CubicWebTC):
test_db_id = 'xmlparser'
@classmethod
......@@ -155,7 +155,7 @@ class SKOSXMLImportTC(CubicWebTC):
self.assertEqual(len(concept.broader_concept), 2)
class LCSVImportTC(CubicWebTC):
class LCSVImportTC(testlib.CubicWebTC):
def setup_database(self):
with self.admin_access.repo_cnx() as cnx:
......
......@@ -20,12 +20,12 @@ from io import BytesIO
from tempfile import NamedTemporaryFile
from cubicweb.web import Redirect
from cubicweb.devtools.testlib import CubicWebTC
from cubicweb.devtools import testlib
from cubes.skos.rdfio import default_graph
class ViewsTC(CubicWebTC):
class ViewsTC(testlib.CubicWebTC):
def setup_database(self):
with self.admin_access.client_cnx() as cnx:
......
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