Changeset 10492
- Timestamp:
- 13 Aug 2013, 13:26:17 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.cas/trunk/waeup/cas/tests/test_server.py
r10491 r10492 5 5 import unittest 6 6 from paste.deploy import loadapp 7 from urlparse import parse_qsl 7 8 from webob import Request, Response 8 9 from webtest import TestApp as WebTestApp # avoid py.test skip message … … 432 433 assert resp2.status == '303 See Other' 433 434 location = resp2.headers['Location'] 434 ticket_value = location[48:] 435 exp_location = 'http://service.com/index.php' 436 exp_location += '?authCAS=CAS&ticket=' + ticket_value 437 # there is only one ticket value in response location 438 assert len(ticket_value) == 32 439 assert location == exp_location 435 query_string = location.split('?', 1)[1] 436 query_params = dict(parse_qsl(query_string)) 437 assert 'authCAS' in query_params.keys() 438 assert 'ticket' in query_params.keys() 439 assert len(query_params['ticket']) == 32 440 440 441 441
Note: See TracChangeset for help on using the changeset viewer.