from pyramid import testing
from pyramid.security import remember
import pyramid.config
class TestingAuthenticationPolicy(object):
def authenticated_userid(self, request):
return 'larry'
def effective_principals(request):
return []
def remember(self, request, principal, **kw):
1/0
def forget(self, request):
1/0
c =
pyramid.config.Configurator(authentication_policy=TestingAuthenticationPolicy())
c.begin()
request = testing.DummyRequest()
testing.setUp(request=request, registry=c.registry)
remember(request, 'the alamo')
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.