test fixes
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 23 Jun 2011 07:41:25 +0200
changeset 7554 fdace9d67d96
parent 7553 935423529f45
child 7562 cdef82ca9eab
test fixes
test/unittest_dbapi.py
test/unittest_entity.py
web/test/unittest_views_xmlrss.py
--- a/test/unittest_dbapi.py	Wed Jun 22 18:53:38 2011 +0200
+++ b/test/unittest_dbapi.py	Thu Jun 23 07:41:25 2011 +0200
@@ -32,7 +32,8 @@
     def test_public_repo_api(self):
         cnx = self.login('anon')
         self.assertEqual(cnx.get_schema(), self.repo.schema)
-        self.assertEqual(cnx.source_defs(), {'system': {'type': 'native', 'uri': 'system'}})
+        self.assertEqual(cnx.source_defs(), {'system': {'type': 'native', 'uri': 'system',
+                                                        'use-cwuri-as-url': False}})
         self.restore_connection() # proper way to close cnx
         self.assertRaises(ProgrammingError, cnx.get_schema)
         self.assertRaises(ProgrammingError, cnx.source_defs)
--- a/test/unittest_entity.py	Wed Jun 22 18:53:38 2011 +0200
+++ b/test/unittest_entity.py	Thu Jun 23 07:41:25 2011 +0200
@@ -610,7 +610,9 @@
         req = self.request()
         note = req.create_entity('Note', type=u'z')
         metainf = note.cw_metainformation()
-        self.assertEqual(metainf, {'source': {'type': 'native', 'uri': 'system'}, 'type': u'Note', 'extid': None})
+        self.assertEqual(metainf, {'source': {'type': 'native', 'uri': 'system',
+                                              'use-cwuri-as-url': False},
+                                   'type': u'Note', 'extid': None})
         self.assertEqual(note.absolute_url(), 'http://testing.fr/cubicweb/note/%s' % note.eid)
         metainf['source'] = metainf['source'].copy()
         metainf['source']['base-url']  = 'http://cubicweb2.com/'
--- a/web/test/unittest_views_xmlrss.py	Wed Jun 22 18:53:38 2011 +0200
+++ b/web/test/unittest_views_xmlrss.py	Thu Jun 23 07:41:25 2011 +0200
@@ -14,8 +14,8 @@
   <firstname/>
   <surname/>
   <last_login_time/>
-  <creation_date>%(date)s</creation_date>
-  <modification_date>%(date)s</modification_date>
+  <creation_date>%(cdate)s</creation_date>
+  <modification_date>%(mdate)s</modification_date>
   <tags role="object">
   </tags>
   <in_group role="subject">
@@ -27,7 +27,8 @@
   <use_email role="subject">
   </use_email>
 </CWUser>
-''' % {'date': SERIALIZERS['Datetime'](req.user.creation_date),
+''' % {'cdate': SERIALIZERS['Datetime'](req.user.creation_date),
+       'mdate': SERIALIZERS['Datetime'](req.user.modification_date),
        'state_eid': req.user.in_state[0].eid,
        'group_eid': req.user.in_group[0].eid})