[test] fix tests after renaming e{user,group} to cw{user,group} stable
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
Fri, 22 May 2009 01:05:08 +0200
branchstable
changeset 1902 d38a46498eb9
parent 1901 8681962e171e
child 1903 c30034fe074f
[test] fix tests after renaming e{user,group} to cw{user,group}
sobjects/test/data/sobjects/__init__.py
sobjects/test/unittest_notification.py
sobjects/test/unittest_supervising.py
--- a/sobjects/test/data/sobjects/__init__.py	Fri May 22 00:58:04 2009 +0200
+++ b/sobjects/test/data/sobjects/__init__.py	Fri May 22 01:05:08 2009 +0200
@@ -1,4 +1,5 @@
+from cubicweb.selectors import implements
 from cubicweb.sobjects.notification import StatusChangeMixIn, NotificationView
 
 class UserStatusChangeView(StatusChangeMixIn, NotificationView):
-    accepts = ('CWUser',)
+    __select__ = NotificationView.__select__ & implements('CWUser')
--- a/sobjects/test/unittest_notification.py	Fri May 22 00:58:04 2009 +0200
+++ b/sobjects/test/unittest_notification.py	Fri May 22 01:05:08 2009 +0200
@@ -78,9 +78,9 @@
 
 yeah
 
-url: http://testing.fr/cubicweb/euser/toto
+url: http://testing.fr/cubicweb/cwuser/toto
 ''')
-        self.assertEquals(v.subject(), 'status changed euser #%s (admin)' % u.eid)
+        self.assertEquals(v.subject(), 'status changed cwuser #%s (admin)' % u.eid)
 
 if __name__ == '__main__':
     unittest_main()
--- a/sobjects/test/unittest_supervising.py	Fri May 22 00:58:04 2009 +0200
+++ b/sobjects/test/unittest_supervising.py	Fri May 22 01:05:08 2009 +0200
@@ -43,23 +43,23 @@
         data = re.sub('/\d+', '/EID', data)
         self.assertTextEquals('''user admin has made the following change(s):
 
-* added euser #EID (toto)
-  http://testing.fr/cubicweb/euser/toto
+* added cwuser #EID (toto)
+  http://testing.fr/cubicweb/cwuser/toto
 
-* added relation in_group from euser #EID to egroup #EID
+* added relation in_group from cwuser #EID to cwgroup #EID
 
 * deleted card #EID (une news !)
 
-* added relation bookmarked_by from bookmark #EID to euser #EID
+* added relation bookmarked_by from bookmark #EID to cwuser #EID
 
 * updated comment #EID (#EID)
   http://testing.fr/cubicweb/comment/EID
 
 * deleted relation comments from comment #EID to card #EID
 
-* changed state of euser #EID (anon)
+* changed state of cwuser #EID (anon)
   from state activated to state deactivated
-  http://testing.fr/cubicweb/euser/anon''',
+  http://testing.fr/cubicweb/cwuser/anon''',
                               data)
         # check prepared email
         op._prepare_email()