Changeset 102 for trunk/pysvnmanager/tests/functional/test_role.py
- Timestamp:
- 2009年08月23日 17时45分16秒 (3 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
. (modified) (1 prop)
-
pysvnmanager/tests/functional/test_role.py (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo
-
old new 1 /branches/0.2.1.x:9 5-972 /branches/0.2.3.x:98- 991 /branches/0.2.1.x:94-97 2 /branches/0.2.3.x:98-101
-
- Property svn:mergeinfo
-
trunk/pysvnmanager/tests/functional/test_role.py
r55 r102 26 26 res = self.app.get(url_for(controller='role')) 27 27 assert res.status == 302 28 self.assertEqual(res.header('location'), ' http://localhost/login')28 self.assertEqual(res.header('location'), '/login') 29 29 30 30 # Login as common user … … 32 32 res = self.app.get(url_for(controller='role')) 33 33 assert res.status == 302, res.status 34 assert res.header('location')==' http://localhost/security/failed', res.header('location')35 36 # Permission denied for repos admin(not root admin)34 assert res.header('location')=='/security/failed', res.header('location') 35 36 # Repos admin(not root admin) can access role controller, but with disabled button. 37 37 self.login('admin2') 38 38 res = self.app.get(url_for(controller='role')) 39 assert res.status == 302, res.status 40 assert res.header('location')=='http://localhost/security/failed', res.header('location') 39 assert res.status == 200, res.status 40 assert """ 41 <input type="button" name="save_btn" value='Save' onClick="do_save(this.form)" DISABLED> 42 <input type="button" name="delete_btn" value='Delete' onClick="do_delete(this.form)" DISABLED> 43 <input type="button" name="cancel_btn" value='Cancel' onClick="role_changed()" DISABLED>""" in res.body, res.body[-300:] 41 44 42 45 # Login as superuser … … 50 53 res = self.app.get(url_for(controller='role', action='get_role_info')) 51 54 assert res.status == 302 52 self.assertEqual(res.header('location'), ' http://localhost/login')55 self.assertEqual(res.header('location'), '/login') 53 56 54 57 # authz test … … 56 59 res = self.app.get(url_for(controller='role', action='get_role_info')) 57 60 assert res.status == 302, res.status 58 assert res.header('location')==' http://localhost/security/failed', res.header('location')61 assert res.header('location')=='/security/failed', res.header('location') 59 62 60 63 # Login as superuser … … 125 128 res = self.app.get(url_for(controller='role', action='save_group')) 126 129 assert res.status == 302 127 self.assertEqual(res.header('location'), ' http://localhost/login')130 self.assertEqual(res.header('location'), '/login') 128 131 129 132 # authz test … … 131 134 res = self.app.get(url_for(controller='role', action='save_group')) 132 135 assert res.status == 302, res.status 133 assert res.header('location')=='http://localhost/security/failed', res.header('location') 136 assert res.header('location')=='/security/failed', res.header('location') 137 134 138 135 139 # Change group members, autodrop=no … … 209 213 res = self.app.get(url_for(controller='role', action='delete_group')) 210 214 assert res.status == 302 211 self.assertEqual(res.header('location'), ' http://localhost/login')215 self.assertEqual(res.header('location'), '/login') 212 216 213 217 # authz test … … 215 219 res = self.app.get(url_for(controller='role', action='delete_group')) 216 220 assert res.status == 302, res.status 217 assert res.header('location')==' http://localhost/security/failed', res.header('location')221 assert res.header('location')=='/security/failed', res.header('location') 218 222 219 223 # Delete group failed, ref by other group. … … 271 275 res = self.app.get(url_for(controller='role', action='save_alias')) 272 276 assert res.status == 302 273 self.assertEqual(res.header('location'), ' http://localhost/login')277 self.assertEqual(res.header('location'), '/login') 274 278 275 279 # authz test … … 277 281 res = self.app.get(url_for(controller='role', action='save_alias')) 278 282 assert res.status == 302, res.status 279 assert res.header('location')==' http://localhost/security/failed', res.header('location')283 assert res.header('location')=='/security/failed', res.header('location') 280 284 281 285 # Change alias successfully … … 348 352 res = self.app.get(url_for(controller='role', action='delete_alias')) 349 353 assert res.status == 302 350 self.assertEqual(res.header('location'), ' http://localhost/login')354 self.assertEqual(res.header('location'), '/login') 351 355 352 356 # authz test … … 354 358 res = self.app.get(url_for(controller='role', action='delete_alias')) 355 359 assert res.status == 302, res.status 356 assert res.header('location')==' http://localhost/security/failed', res.header('location')360 assert res.header('location')=='/security/failed', res.header('location') 357 361 358 362 # Delete alias successfully
![(please configure the [header_logo] section in trac.ini)](/trac/pysvnmanager/chrome/common/trac_banner.png)