Changeset 10411 for main/waeup.cas/trunk/waeup/cas/tests
- Timestamp:
- 6 Jul 2013, 09:58:16 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.cas/trunk/waeup/cas/tests/test_server.py
r10410 r10411 126 126 assert 'Set-Cookie' not in resp.headers 127 127 return 128 129 def test_login_renew_with_cookie(self): 130 # 2.1.1: cookie will be ignored when renew is set 131 app = CASServer() 132 tgc = create_tgc_value() 133 app.db.add(tgc) 134 value = str(tgc.value) 135 req = Request.blank('https://localhost/login?renew=true') 136 req.headers['Cookie'] = 'cas-tgc=%s' % value 137 resp = app(req) 138 assert resp.status == '200 OK' 139 assert b'username' in resp.body 140 assert 'Set-Cookie' not in resp.headers 141 142 def test_login_renew_as_empty_string(self): 143 # `renew` is handled correctly, even with empty value 144 app = CASServer() 145 tgc = create_tgc_value() 146 app.db.add(tgc) 147 value = str(tgc.value) 148 req = Request.blank('https://localhost/login?renew') 149 req.headers['Cookie'] = 'cas-tgc=%s' % value 150 resp = app(req) 151 assert resp.status == '200 OK' 152 assert b'username' in resp.body 153 assert 'Set-Cookie' not in resp.headers 128 154 129 155
Note: See TracChangeset for help on using the changeset viewer.