[sparql] add failing test for two entities with dc:title stable
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
Sun, 30 May 2010 02:03:54 +0200
branchstable
changeset 5610 91b0f118328a
parent 5609 d247e2e06db2
child 5612 177a9a059717
[sparql] add failing test for two entities with dc:title
test/unittest_spa2rql.py
xy.py
--- a/test/unittest_spa2rql.py	Sun May 30 01:54:12 2010 +0200
+++ b/test/unittest_spa2rql.py	Sun May 30 02:03:54 2010 +0200
@@ -23,6 +23,7 @@
 xy.add_equivalence('Project', 'doap:Project')
 xy.add_equivalence('Project creation_date', 'doap:Project doap:created')
 xy.add_equivalence('Project name', 'doap:Project doap:name')
+xy.add_equivalence('Project name', 'doap:Project dc:title')
 
 
 config = TestServerConfiguration('data')
@@ -179,6 +180,16 @@
               doap:name "cubicweb".
     }''', 'Any PROJECT WHERE PROJECT name %(a)s, PROJECT is Project', {'a': 'cubicweb'})
 
+    def test_dctitle_both_project_cwuser(self):
+        self._test('''
+    PREFIX doap: <http://usefulinc.com/ns/doap#>
+    PREFIX dc: <http://purl.org/dc/elements/1.1/>
+    SELECT ?project ?title
+    WHERE  {
+      ?project a doap:Project;
+              dc:title ?title.
+    }''', 'Any PROJECT,TITLE WHERE PROJECT name TITLE, PROJECT is Project')
+
 # # Two elements in the group
 # PREFIX :  <http://example.org/ns#>
 # SELECT *
--- a/xy.py	Sun May 30 01:54:12 2010 +0200
+++ b/xy.py	Sun May 30 02:03:54 2010 +0200
@@ -33,5 +33,5 @@
 xy.add_equivalence('created_by', 'dc:creator')
 xy.add_equivalence('description', 'dc:description')
 xy.add_equivalence('CWUser', 'foaf:Person')
-xy.add_equivalence('CWUser login', 'dc:title')
+xy.add_equivalence('CWUser login', 'foaf:Person dc:title')
 xy.add_equivalence('CWUser surname', 'foaf:Person foaf:name')