Last change
on this file since 17254 was
17179,
checked in by uli, 2 years ago
|
Upgrade beaker and dependencies.
The old version of beaker we used was using outdated cryptolibs that do not work on more recent operating systems. This upgrade introduces a new ZCML snippet in ftesting.zcml and site.zcml which replaces the former beaker.py submodule. Therefore this change is not backwards compatible and you must run buildout again to generate a new site.zcml (or at least change it manually).
|
-
Property svn:keywords set to
Id
|
File size:
826 bytes
|
Line | |
---|
1 | from zope.component.hooks import setSite |
---|
2 | from zope.publisher.browser import TestRequest |
---|
3 | from zope.session.interfaces import ISession |
---|
4 | from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase |
---|
5 | |
---|
6 | class 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 | self.assertTrue(session.get("_path", None) is not None) |
---|
23 | return |
---|
Note: See
TracBrowser for help on using the repository browser.