use space as separator, dot may be found in xml ns
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 22 Jul 2009 19:42:44 +0200
changeset 2428 a3e10e6a2461
parent 2427 3e0ef847a546
child 2429 d3f4bffb57d0
use space as separator, dot may be found in xml ns
test/unittest_spa2rql.py
--- a/test/unittest_spa2rql.py	Wed Jul 22 19:42:35 2009 +0200
+++ b/test/unittest_spa2rql.py	Wed Jul 22 19:42:44 2009 +0200
@@ -4,7 +4,8 @@
 from cubicweb.spa2rql import Sparql2rqlTranslator
 
 xy.add_equivalence('Project', 'doap:Project')
-xy.add_equivalence('Project.creation_date', 'doap:Project.doap:created')
+xy.add_equivalence('Project creation_date', 'doap:Project doap:created')
+xy.add_equivalence('Project name', 'doap:Project doap:name')
 
 
 config = TestServerConfiguration('data')
@@ -69,7 +70,7 @@
     }''', 'Any X, CD WHERE X creation_date CD')
 
     def test_base_any_attr_sel_amb(self):
-        xy.add_equivalence('Version.publication_date', 'doap:Version.dc:date')
+        xy.add_equivalence('Version publication_date', 'doap:Version dc:date')
         try:
             self._test('''
     PREFIX dc: <http://purl.org/dc/elements/1.1/>
@@ -78,7 +79,7 @@
       ?x dc:date ?cd;
     }''', '(Any X, CD WHERE , X creation_date CD) UNION (Any X, CD WHERE , X publication_date CD, X is Version)')
         finally:
-            xy.remove_equivalence('Version.publication_date', 'doap:Version.dc:date')
+            xy.remove_equivalence('Version publication_date', 'doap:Version dc:date')
 
 # # Two elements in the group
 # PREFIX :  <http://example.org/ns#>