sobjects/test/unittest_parsers.py
changeset 7531 e891ca479586
parent 7463 a7daba4046db
child 7534 d58a9d96aad8
--- a/sobjects/test/unittest_parsers.py	Thu Jun 16 19:46:39 2011 +0200
+++ b/sobjects/test/unittest_parsers.py	Fri Jun 17 16:13:33 2011 +0200
@@ -116,6 +116,15 @@
                             ])
         req.create_entity('Tag', name=u'hop')
 
+    def test_complete_url(self):
+        dfsource = self.repo.sources_by_uri['myfeed']
+        parser = dfsource._get_parser(self.session)
+        self.assertEqual(parser.complete_url('http://www.cubicweb.org/cwuser'),
+                         'http://www.cubicweb.org/cwuser?relation=tags-object&relation=in_group-subject&relation=use_email-subject&vid=xml')
+        self.assertEqual(parser.complete_url('http://www.cubicweb.org/cwuser?vid=rdf&relation=hop'),
+                         'http://www.cubicweb.org/cwuser?relation=hop&relation=tags-object&relation=in_group-subject&relation=use_email-subject&vid=rdf')
+
+
     def test_actions(self):
         dfsource = self.repo.sources_by_uri['myfeed']
         self.assertEqual(dfsource.mapping,