[repo test] fix broken tests
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 07 Jul 2011 17:06:50 +0200
changeset 7631 4ac19f288149
parent 7629 58f11f7dad68
child 7632 3c9dfc6e820b
[repo test] fix broken tests
server/test/unittest_datafeed.py
server/test/unittest_ldapuser.py
server/test/unittest_multisources.py
--- a/server/test/unittest_datafeed.py	Thu Jul 07 16:22:08 2011 +0200
+++ b/server/test/unittest_datafeed.py	Thu Jul 07 17:06:50 2011 +0200
@@ -64,10 +64,10 @@
             self.assertEqual(entity.cw_source[0].name, 'myfeed')
             self.assertEqual(entity.cw_metainformation(),
                              {'type': 'Card',
-                              'source': {'uri': 'myfeed', 'type': 'datafeed'},
+                              'source': {'uri': 'myfeed', 'type': 'datafeed', 'use-cwuri-as-url': True},
                               'extid': 'http://www.cubicweb.org/'}
                              )
-            self.assertEqual(entity.absolute_url(), 'extid': 'http://www.cubicweb.org/')
+            self.assertEqual(entity.absolute_url(), 'http://www.cubicweb.org/')
             # test repo cache keys
             self.assertEqual(self.repo._type_source_cache[entity.eid],
                              ('Card', 'system', 'http://www.cubicweb.org/', 'myfeed'))
--- a/server/test/unittest_ldapuser.py	Thu Jul 07 16:22:08 2011 +0200
+++ b/server/test/unittest_ldapuser.py	Thu Jul 07 17:06:50 2011 +0200
@@ -386,7 +386,7 @@
         self.assertEqual(len(rset), 1)
         e = rset.get_entity(0, 0)
         self.assertEqual(e.eid, eid)
-        self.assertEqual(e.cw_metainformation(), {'source': {'type': u'native', 'uri': u'system'},
+        self.assertEqual(e.cw_metainformation(), {'source': {'type': u'native', 'uri': u'system', 'use-cwuri-as-url': False},
                                                   'type': 'CWUser',
                                                   'extid': None})
         self.assertEqual(e.cw_source[0].name, 'system')
--- a/server/test/unittest_multisources.py	Thu Jul 07 16:22:08 2011 +0200
+++ b/server/test/unittest_multisources.py	Thu Jul 07 17:06:50 2011 +0200
@@ -160,11 +160,11 @@
         # since they are orderd by eid, we know the 3 first one is coming from the system source
         # and the others from external source
         self.assertEqual(rset.get_entity(0, 0).cw_metainformation(),
-                          {'source': {'type': 'native', 'uri': 'system'},
+                          {'source': {'type': 'native', 'uri': 'system', 'use-cwuri-as-url': False},
                            'type': u'Card', 'extid': None})
         externent = rset.get_entity(3, 0)
         metainf = externent.cw_metainformation()
-        self.assertEqual(metainf['source'], {'type': 'pyrorql', 'base-url': 'http://extern.org/', 'uri': 'extern'})
+        self.assertEqual(metainf['source'], {'type': 'pyrorql', 'base-url': 'http://extern.org/', 'uri': 'extern', 'use-cwuri-as-url': False})
         self.assertEqual(metainf['type'], 'Card')
         self.assert_(metainf['extid'])
         etype = self.sexecute('Any ETN WHERE X is ET, ET name ETN, X eid %(x)s',