Changeset 17280
- Timestamp:
- 14 Jan 2023, 04:57:11 (2 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r17273 r17280 4 4 1.8.1.dev0 (unreleased) 5 5 ======================= 6 7 * Upgrade `dolmen.beaker` dependency. Removes other outdated crypto 8 dependencies. Requires new buildout run. Moves cookie configuration from code 9 to site.zcml session config. 6 10 7 11 * Beautify INSTALL.txt. -
main/waeup.kofa/trunk/etc/site.zcml.in
r14672 r17280 1 1 <configure xmlns="http://namespaces.zope.org/zope" 2 xmlns:browser="http://namespaces.zope.org/browser" 2 3 xmlns:kofa="http://namespaces.waeup.org/kofa" 3 4 i18n_domain="${kofa_params:devel_pkg}"> … … 80 81 principal="zope.manager" /> 81 82 </configure> 83 84 <!-- session --> 85 <browser:beakerSession 86 key="waeup.kofa.session.id" 87 secret="KofaRocks" 88 timeout="3600" 89 type="cookie" 90 validate_key="thisMightBeChanged" 91 /> 92 82 93 </configure> -
main/waeup.kofa/trunk/src/waeup/kofa/ftesting.zcml
r9855 r17280 1 1 <configure 2 2 xmlns="http://namespaces.zope.org/zope" 3 xmlns:browser="http://namespaces.zope.org/browser" 3 4 xmlns:kofa="http://namespaces.waeup.org/kofa" 4 5 i18n_domain="waeup.kofa" … … 50 51 principal="zope.Everybody" 51 52 /> 52 <grant 53 <grant 53 54 permission="waeup.Anonymous" 54 55 principal="zope.Anybody" … … 70 71 <grant role="zope.Manager" principal="zope.mgr" /> 71 72 73 <!-- session --> 74 <browser:beakerSession 75 key="waeup.kofa.session.id" 76 secret="KofaRocks" 77 timeout="3600" 78 type="cookie" 79 validate_key="thisMightBeChanged" 80 /> 81 72 82 </configure> -
main/waeup.kofa/trunk/src/waeup/kofa/tests/test_beaker.py
r12110 r17280 1 # We test beaker functionality, although we have no beaker-related code 2 # anymore. All configuration is done in ZCML snippets in 3 # site.zcml/ftesting.zcml now. 4 # The dolmen.beaker package is developed on: https://github.com/trollfot/dolmen.beaker 5 from dolmen.beaker.interfaces import ISessionConfig 6 from zope.component import queryUtility 1 7 from zope.component.hooks import setSite 2 8 from zope.publisher.browser import TestRequest 3 9 from zope.session.interfaces import ISession 4 10 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase 11 5 12 6 13 class BeakerTests(FunctionalTestCase): … … 18 25 setSite(self.getRootFolder()) # needed to start transaction 19 26 request = TestRequest() 20 session = ISession(request) 27 session = ISession(request) # this is a Zope session 21 28 self.assertTrue(session.__module__.startswith('dolmen.beaker')) 29 self.assertTrue(session.get("_path", None) is not None) 22 30 return 31 32 def test_beaker_session_values(self): 33 # Ensure we get also a beaker session 34 # (which is part of a Zope session) 35 try: 36 import dolmen.beaker 37 except ImportError: 38 # no beaker installed, no test 39 return 40 setSite(self.getRootFolder()) # needed to start transaction 41 config = ISessionConfig 42 request = TestRequest() 43 session = ISession(request).session 44 self.assertEqual(session.__module__, "beaker.session") 45 self.assertTrue(session.get("_path", None) is not None) 46 return 47 48 def test_beaker_config_accessible(self): 49 # The session config is set in site.zcml / ftesting.zcml 50 # See beakerSession directive 51 # See https://github.com/trollfot/dolmen.beaker/blob/master/src/dolmen/beaker/zcml.py 52 # for options 53 config = queryUtility(ISessionConfig) 54 self.assertEqual(config.get("key"), "waeup.kofa.session.id") 55 self.assertEqual(config.get("timeout"), 3600) -
main/waeup.kofa/trunk/versions.cfg
r16157 r17280 10 10 alabaster = 0.7.7 11 11 Babel = 1.3 12 Beaker = 1. 6.412 Beaker = 1.11.0 13 13 collective.recipe.sphinxbuilder = 0.8.2 14 14 collective.recipe.template = 2.1 … … 17 17 distribute = 0.6.49 18 18 docutils = 0.11 19 dolmen.beaker = 0. 119 dolmen.beaker = 0.4 20 20 experimental.cssselect = 0.3 21 funcsigs = 1.0.2 21 22 grok = 1.1.1 22 23 grokcore.view = 1.13.5 … … 47 48 psutil = 2.1.3 48 49 py = 1.0.2 49 pycryptopp = 0.6.0.120656932814151052564863480392819966882104540895850 50 Pygments = 2.0.2 51 51 pyprof2calltree = 1.1.1
Note: See TracChangeset for help on using the changeset viewer.