Skip to content

Commit

Permalink
make sessionSetUp reusable, this should go to zope.session.testing once
Browse files Browse the repository at this point in the history
update TODO.txt
  • Loading branch information
projekt01 committed Mar 31, 2008
1 parent fbaf7a4 commit e0fa581
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions TODO.txt
Expand Up @@ -3,3 +3,7 @@ TODO
====

- implement nickName, email and phone?

- check imports

- check dependency in buildout setup
2 changes: 2 additions & 0 deletions src/z3c/authenticator/credential.py
Expand Up @@ -175,7 +175,9 @@ class SessionCredentialsPlugin(persistent.Persistent, contained.Contained):
To illustrate how a session plugin works, we'll first setup some session
machinery:
>>> from zope.app.testing import placelesssetup
>>> from z3c.authenticator.testing import sessionSetUp
>>> placelesssetup.setUp()
>>> sessionSetUp()
This lets us retrieve the same session info from any test request, which
Expand Down
2 changes: 0 additions & 2 deletions src/z3c/authenticator/testing.py
Expand Up @@ -20,7 +20,6 @@
import zope.interface
from zope.publisher.interfaces import IRequest
from zope.app.testing import setup
from zope.app.testing import placelesssetup

from zope.session.interfaces import IClientId
from zope.session.interfaces import IClientIdManager
Expand Down Expand Up @@ -52,7 +51,6 @@ def __new__(cls, request):


def sessionSetUp(session_data_container_class=RAMSessionDataContainer):
placelesssetup.setUp()
zope.component.provideAdapter(TestClientId, (IRequest,), IClientId)
zope.component.provideAdapter(Session, (IRequest,), ISession)
zope.component.provideUtility(CookieClientIdManager(), IClientIdManager)
Expand Down

0 comments on commit e0fa581

Please sign in to comment.