Changeset 103 for trunk/pysvnmanager/tests/functional/test_role.py
- Timestamp:
- 2009年08月23日 18时14分31秒 (3 years ago)
- Files:
-
- 1 modified
-
trunk/pysvnmanager/tests/functional/test_role.py (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pysvnmanager/tests/functional/test_role.py
r102 r103 26 26 res = self.app.get(url_for(controller='role')) 27 27 assert res.status == 302 28 self.assertEqual(res.header('location'), '/login')28 assert res.header('location').endswith('/login'), res.header('location') 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') =='/security/failed', res.header('location')34 assert res.header('location').endswith('/security/failed'), res.header('location') 35 35 36 36 # Repos admin(not root admin) can access role controller, but with disabled button. … … 53 53 res = self.app.get(url_for(controller='role', action='get_role_info')) 54 54 assert res.status == 302 55 self.assertEqual(res.header('location'), '/login')55 assert res.header('location').endswith('/login'), res.header('location') 56 56 57 57 # authz test … … 59 59 res = self.app.get(url_for(controller='role', action='get_role_info')) 60 60 assert res.status == 302, res.status 61 assert res.header('location') =='/security/failed', res.header('location')61 assert res.header('location').endswith('/security/failed'), res.header('location') 62 62 63 63 # Login as superuser … … 128 128 res = self.app.get(url_for(controller='role', action='save_group')) 129 129 assert res.status == 302 130 self.assertEqual(res.header('location'), '/login')130 assert res.header('location').endswith('/login'), res.header('location') 131 131 132 132 # authz test … … 134 134 res = self.app.get(url_for(controller='role', action='save_group')) 135 135 assert res.status == 302, res.status 136 assert res.header('location') =='/security/failed', res.header('location')136 assert res.header('location').endswith('/security/failed'), res.header('location') 137 137 138 138 … … 213 213 res = self.app.get(url_for(controller='role', action='delete_group')) 214 214 assert res.status == 302 215 self.assertEqual(res.header('location'), '/login')215 assert res.header('location').endswith('/login'), res.header('location') 216 216 217 217 # authz test … … 219 219 res = self.app.get(url_for(controller='role', action='delete_group')) 220 220 assert res.status == 302, res.status 221 assert res.header('location') =='/security/failed', res.header('location')221 assert res.header('location').endswith('/security/failed'), res.header('location') 222 222 223 223 # Delete group failed, ref by other group. … … 275 275 res = self.app.get(url_for(controller='role', action='save_alias')) 276 276 assert res.status == 302 277 self.assertEqual(res.header('location'), '/login')277 assert res.header('location').endswith('/login'), res.header('location') 278 278 279 279 # authz test … … 281 281 res = self.app.get(url_for(controller='role', action='save_alias')) 282 282 assert res.status == 302, res.status 283 assert res.header('location') =='/security/failed', res.header('location')283 assert res.header('location').endswith('/security/failed'), res.header('location') 284 284 285 285 # Change alias successfully … … 352 352 res = self.app.get(url_for(controller='role', action='delete_alias')) 353 353 assert res.status == 302 354 self.assertEqual(res.header('location'), '/login')354 assert res.header('location').endswith('/login'), res.header('location') 355 355 356 356 # authz test … … 358 358 res = self.app.get(url_for(controller='role', action='delete_alias')) 359 359 assert res.status == 302, res.status 360 assert res.header('location') =='/security/failed', res.header('location')360 assert res.header('location').endswith('/security/failed'), res.header('location') 361 361 362 362 # Delete alias successfully
![(please configure the [header_logo] section in trac.ini)](/trac/pysvnmanager/chrome/common/trac_banner.png)