[saem-devel] [PATCH 10 of 10] Fix imports in test following new layout

saem-devel at lists.cubicweb.org saem-devel at lists.cubicweb.org
Wed Jan 25 10:05:08 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1485274396 -3600
#      Tue Jan 24 17:13:16 2017 +0100
# Node ID 4702aee7285abbc0bafb71e9219612af6bb1eb68
# Parent  84c910ef62dfd7effede0c957aa00a1e25a0472a
Fix imports in test following new layout

Test fails without this because aliased modules are unexpectedly loaded twice.

diff --git a/test/test_oai.py b/test/test_oai.py
--- a/test/test_oai.py
+++ b/test/test_oai.py
@@ -27,7 +27,7 @@ from cubicweb.devtools.testlib import Cu
 
 from cubes.oaipmh.views import OAIError, OAIRequest
 
-from cubes.saem_ref import permanent_url
+from cubicweb_saem_ref import permanent_url
 
 import testutils
 
diff --git a/test/test_saem_ref.py b/test/test_saem_ref.py
--- a/test/test_saem_ref.py
+++ b/test/test_saem_ref.py
@@ -43,7 +43,7 @@ from logilab.common import attrdict
 
 from cubicweb.devtools import testlib
 
-from cubes.saem_ref import cwuri_url
+from cubicweb_saem_ref import cwuri_url
 
 import testutils
 
diff --git a/test/test_seda.py b/test/test_seda.py
--- a/test/test_seda.py
+++ b/test/test_seda.py
@@ -19,9 +19,10 @@ import unittest
 
 from cubicweb.devtools.testlib import CubicWebTC
 
-from cubes.saem_ref.entities import seda  # noqa - trigger monkey-patch
 from cubes.seda.entities.profile_generation import SEDA1XSDExport
 
+from cubicweb_saem_ref.entities import seda  # noqa - trigger monkey-patch
+
 import testutils
 
 
diff --git a/test/test_views.py b/test/test_views.py
--- a/test/test_views.py
+++ b/test/test_views.py
@@ -33,7 +33,7 @@ from cubicweb.devtools.testlib import Cu
 
 from cubes.skos.rdfio import default_graph
 
-from cubes.saem_ref.views.widgets import process_incomplete_date
+from cubicweb_saem_ref.views.widgets import process_incomplete_date
 
 import testutils
 
diff --git a/test/unittest_autocomplete.py b/test/unittest_autocomplete.py
--- a/test/unittest_autocomplete.py
+++ b/test/unittest_autocomplete.py
@@ -23,7 +23,7 @@ from logilab.common import flatten
 from cubicweb.devtools import PostgresApptestConfiguration
 from cubicweb.devtools.testlib import CubicWebTC
 
-from cubes.saem_ref.views.autocompletesearch import words_matching_term
+from cubicweb_saem_ref.views.autocompletesearch import words_matching_term
 
 import testutils
 
diff --git a/test/unittest_entities_agent.py b/test/unittest_entities_agent.py
--- a/test/unittest_entities_agent.py
+++ b/test/unittest_entities_agent.py
@@ -21,7 +21,8 @@ from cubicweb.devtools.testlib import Cu
 
 from cubes.skos.rdfio import RDFLibRDFGraph, RDFRegistry
 
-from cubes.saem_ref import permanent_url
+from cubicweb_saem_ref import permanent_url
+
 import testutils
 
 
diff --git a/test/unittest_entities_container.py b/test/unittest_entities_container.py
--- a/test/unittest_entities_container.py
+++ b/test/unittest_entities_container.py
@@ -17,7 +17,7 @@
 
 from cubicweb.devtools.testlib import CubicWebTC
 
-from cubes.saem_ref.entities import container
+from cubicweb_saem_ref.entities import container
 
 import testutils
 
diff --git a/test/unittest_hooks.py b/test/unittest_hooks.py
--- a/test/unittest_hooks.py
+++ b/test/unittest_hooks.py
@@ -23,7 +23,7 @@ import pytz
 
 from cubicweb.devtools.testlib import CubicWebTC
 
-from cubes.saem_ref.hooks import extract_ark
+from cubicweb_saem_ref.hooks import extract_ark
 
 import testutils
 
diff --git a/test/unittest_schema.py b/test/unittest_schema.py
--- a/test/unittest_schema.py
+++ b/test/unittest_schema.py
@@ -24,8 +24,8 @@ from six.moves import reduce
 from cubicweb import ValidationError, Unauthorized, neg_role
 from cubicweb.devtools.testlib import CubicWebTC
 
-from cubes.saem_ref import (PERMISSIONS_GRAPHS, mandatory_rdefs,
-                            optional_relations)
+from cubicweb_saem_ref import (PERMISSIONS_GRAPHS, mandatory_rdefs,
+                               optional_relations)
 
 import testutils
 
diff --git a/test/unittest_site_cubicweb.py b/test/unittest_site_cubicweb.py
--- a/test/unittest_site_cubicweb.py
+++ b/test/unittest_site_cubicweb.py
@@ -21,7 +21,7 @@ import unittest
 
 from cubicweb import devtools  # noqa
 
-from cubes.saem_ref.site_cubicweb import print_tzdatetime_local
+from cubicweb_saem_ref.site_cubicweb import print_tzdatetime_local
 
 
 class PrintTZDatetimeTC(unittest.TestCase):


More information about the saem-devel mailing list