[PATCH 2 of 6 seda] [test] Make testutils importable

Sylvain Thenault sylvain.thenault at logilab.fr
Fri Mar 31 17:08:44 CEST 2017

# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1490951516 -7200
#      Fri Mar 31 11:11:56 2017 +0200
# Node ID 1269e5d31ecd511d580fedea7f1443391271edeb
# Parent  801dd5c8512d3d07b1db1712bc56d642be72214f
[test] Make testutils importable

diff --git a/test/testutils.py b/cubicweb_seda/testutils.py
rename from test/testutils.py
rename to cubicweb_seda/testutils.py
diff --git a/test/test_diag.py b/test/test_diag.py
--- a/test/test_diag.py
+++ b/test/test_diag.py
@@ -15,11 +15,11 @@
 # with this program. If not, see <http://www.gnu.org/licenses/>.
 """cubicweb-seda versions compatibility diagnosis test."""
 from cubicweb.devtools.testlib import CubicWebTC
-from testutils import create_archive_unit
+from cubicweb_seda.testutils import create_archive_unit
 class CompatAnalyzerTC(CubicWebTC):
     def test_rules(self):
diff --git a/test/test_entities.py b/test/test_entities.py
--- a/test/test_entities.py
+++ b/test/test_entities.py
@@ -26,11 +26,11 @@ from cubicweb.devtools.testlib import Cu
 from cubicweb_seda.entities import (seda_profile_container_def, simplified_profile,
                                     full_seda2_profile, parent_and_container,
                                     rule_type_from_etype, custom)
-from testutils import create_archive_unit, create_data_object
+from cubicweb_seda.testutils import create_archive_unit, create_data_object
 def sort_container(container_def):
     for k, v in container_def:
         yield k, sorted(v)
diff --git a/test/test_hooks.py b/test/test_hooks.py
--- a/test/test_hooks.py
+++ b/test/test_hooks.py
@@ -18,11 +18,11 @@
 from itertools import chain, repeat
 from cubicweb import ValidationError
 from cubicweb.devtools.testlib import CubicWebTC
-import testutils
+from cubicweb_seda import testutils
 class ValidationHooksTC(CubicWebTC):
     def test_ref_non_rule_constraints(self):
diff --git a/test/test_profile_generation.py b/test/test_profile_generation.py
--- a/test/test_profile_generation.py
+++ b/test/test_profile_generation.py
@@ -34,11 +34,11 @@ from logilab.common.decorators import ca
 from cubicweb.devtools.testlib import CubicWebTC
 from cubicweb_seda.xsd2yams import XSDMMapping
 from cubicweb_seda.entities.profile_generation import _path_target_values, eid2xmlid
-import testutils
+from cubicweb_seda import testutils
 class XmlTestMixin(object):
     """Mixin class providing additional assertion methods for checking XML data."""
diff --git a/test/test_schema.py b/test/test_schema.py
--- a/test/test_schema.py
+++ b/test/test_schema.py
@@ -21,11 +21,11 @@ from cubicweb import ValidationError, Un
 from cubicweb.devtools.testlib import CubicWebTC
 from cubicweb.schema import ERQLExpression, RRQLExpression
 from cubicweb_seda import iter_all_rdefs
-import testutils
+from cubicweb_seda import testutils
 class SchemaConceptConstraintsTC(CubicWebTC):
     def setup_database(self):
diff --git a/test/test_views.py b/test/test_views.py
--- a/test/test_views.py
+++ b/test/test_views.py
@@ -24,11 +24,11 @@ from cubicweb.devtools.testlib import Cu
 from cubicweb.web import INTERNAL_FIELD_VALUE
 from cubicweb_seda.xsd2yams import RULE_TYPES
 from cubicweb_seda.views import archiveunit, clone, export, mgmt_rules
-import testutils
+from cubicweb_seda import testutils
 def entity_fields(fields):
     return [text_type(field.name) for field in fields
             if field.eidparam and not field.name.startswith('__')]

More information about the saem-devel mailing list