[web test] fix test broken by new users/groups management views
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 16 Sep 2011 13:56:00 +0200
changeset 7802 d0bf71aff4a1
parent 7801 67f9677c1253
child 7803 02e141e41da2
[web test] fix test broken by new users/groups management views
web/test/unittest_urlrewrite.py
web/test/unittest_viewselector.py
web/views/cwuser.py
--- a/web/test/unittest_urlrewrite.py	Fri Sep 16 12:48:28 2011 +0200
+++ b/web/test/unittest_urlrewrite.py	Fri Sep 16 13:56:00 2011 +0200
@@ -53,7 +53,10 @@
             ('/error', dict(vid='error')),
             ('/sparql', dict(vid='sparql')),
             ('/processinfo', dict(vid='processinfo')),
-            ('/cwuser$', {'vid': 'cw.user-management'}),
+            ('/cwuser$', {'vid': 'cw.users-and-groups-management',
+                          'tab': 'cw_users_management'}),
+            ('/cwgroup$', {'vid': 'cw.users-and-groups-management',
+                           'tab': 'cw_groups_management'}),
             ('/cwsource$', {'vid': 'cw.source-management'}),
             ('/schema/([^/]+?)/?$', {'rql': r'Any X WHERE X is CWEType, X name "\1"', 'vid': 'primary'}),
             ('/add/([^/]+?)/?$' , dict(vid='creation', etype=r'\1')),
--- a/web/test/unittest_viewselector.py	Fri Sep 16 12:48:28 2011 +0200
+++ b/web/test/unittest_viewselector.py	Fri Sep 16 13:56:00 2011 +0200
@@ -91,7 +91,7 @@
         self.assertListEqual(self.pviews(req, None),
                              [('changelog', wdoc.ChangeLogView),
                               ('cw.source-management', cwsources.CWSourceManagementView),
-                              ('cw.user-management', cwuser.CWUserManagementView),
+                              ('cw.users-and-groups-management', cwuser.UsersAndGroupsManagementView),
                               ('gc', debug.GCView),
                               ('index', startup.IndexView),
                               ('info', debug.ProcessInformationView),
@@ -228,7 +228,7 @@
         rset = req.execute('CWUser X')
         self.assertListEqual(self.pviews(req, rset),
                              [('csvexport', csvexport.CSVRsetView),
-                              ('cw.user-table', cwuser.CWUserTable),
+                              ('cw.users-table', cwuser.CWUsersTable),
                               ('ecsvexport', csvexport.CSVEntityView),
                               ('editable-table', tableview.EditableTableView),
                               ('filetree', treeview.FileTreeView),
--- a/web/views/cwuser.py	Fri Sep 16 12:48:28 2011 +0200
+++ b/web/views/cwuser.py	Fri Sep 16 13:56:00 2011 +0200
@@ -122,6 +122,7 @@
         self.wview('editable-table', rset, 'null', displayfilter=True,
                    displaycols=range(5), mainindex=0, headers=headers)
 
+
 class CWGroupPermTab(EntityView):
     __regid__ = 'cwgroup-permissions'
     __select__ = is_instance('CWGroup')