| | |
| | | return [('Set-Cookie', set_cookie)] |
| | | |
| | | def __repr__(self): |
| | | return '<%s %s>' % (self.__class__.__name__, id(self)) |
| | | return '<%s %s>' % (self.__class__.__name__, |
| | | id(self)) #pragma NO COVERAGE |
| | | |
| | | def make_plugin(cookie_name='repoze.who.plugins.cookie', cookie_path='/'): |
| | | plugin = InsecureCookiePlugin(cookie_name, cookie_path) |
| | |
| | | environ = self._makeEnviron({'HTTP_COOKIE':'oatmeal=a'}) |
| | | result = plugin.identify(environ) |
| | | self.assertEqual(result, None) |
| | | |
| | | def test_identify_badcookies_binascci_but_not_splittable(self): |
| | | plugin = self._makeOne('oatmeal') |
| | | auth = 'bogus'.encode('base64').rstrip() |
| | | environ = self._makeEnviron({'HTTP_COOKIE':'oatmeal=%s' % auth}) |
| | | result = plugin.identify(environ) |
| | | self.assertEqual(result, None) |
| | | |
| | | def test_identify_success(self): |
| | | plugin = self._makeOne('oatmeal') |