source: main/waeup.ikoba/trunk/src/waeup/ikoba/tests/test_beaker.py @ 14086

Last change on this file since 14086 was 11997, checked in by Henrik Bettermann, 10 years ago

propset svn:keywords "Id"

  • Property svn:keywords set to Id
File size: 763 bytes
RevLine 
[8426]1from zope.component.hooks import setSite
2from zope.publisher.browser import TestRequest
3from zope.session.interfaces import ISession
[11949]4from waeup.ikoba.testing import FunctionalLayer, FunctionalTestCase
[8426]5
6class BeakerTests(FunctionalTestCase):
7    # Beaker-related tests.
8
9    layer = FunctionalLayer
10
11    def test_beaker_session(self):
12        # Make sure we get a beaker session when asking for ISession.
13        try:
14            import dolmen.beaker
15        except ImportError:
16            # no beaker installed, no test
17            return
18        setSite(self.getRootFolder()) # needed to start transaction
19        request = TestRequest()
20        session = ISession(request)
21        self.assertTrue(session.__module__.startswith('dolmen.beaker'))
22        return
Note: See TracBrowser for help on using the repository browser.