[Checkins] SVN: zope.security/trunk/ Ensure that simple zope.schema's VocabularyRegistry is used for PermissionVocabulary tests to make them work in the KGS testing environment.
Dan Korostelev
nadako at gmail.com
Sat Mar 14 20:51:22 EDT 2009
Log message for revision 98116:
Ensure that simple zope.schema's VocabularyRegistry is used for PermissionVocabulary tests to make them work in the KGS testing environment.
Changed:
U zope.security/trunk/CHANGES.txt
U zope.security/trunk/src/zope/security/permission.py
-=-
Modified: zope.security/trunk/CHANGES.txt
===================================================================
--- zope.security/trunk/CHANGES.txt 2009-03-14 20:55:37 UTC (rev 98115)
+++ zope.security/trunk/CHANGES.txt 2009-03-15 00:51:22 UTC (rev 98116)
@@ -5,7 +5,10 @@
3.6.3 (unreleased)
------------------
-- ...
+- Ensure that simple zope.schema's VocabularyRegistry is used for
+ PermissionVocabulary tests, because it's replaced implicitly in
+ environments with zope.app.schema installed that makes that tests
+ fail.
3.6.2 (2009-03-14)
------------------
Modified: zope.security/trunk/src/zope/security/permission.py
===================================================================
--- zope.security/trunk/src/zope/security/permission.py 2009-03-14 20:55:37 UTC (rev 98115)
+++ zope.security/trunk/src/zope/security/permission.py 2009-03-15 00:51:22 UTC (rev 98116)
@@ -75,8 +75,11 @@
Term values are permissions, while term tokens are permission IDs.
- To illustrate, we need to register the permission IDs vocab:
+ To illustrate, we need to register the permission IDs vocabulary:
+ >>> from zope.schema.vocabulary import _clear
+ >>> _clear()
+
>>> from zope.schema.vocabulary import getVocabularyRegistry
>>> registry = getVocabularyRegistry()
>>> registry.register('Permissions', PermissionsVocabulary)
@@ -119,8 +122,11 @@
Terms are sorted by title except for 'Public', which always appears as
the first term.
- To illustrate, we need to register the permission IDs vocab:
+ To illustrate, we need to register the permission IDs vocabulary:
+ >>> from zope.schema.vocabulary import _clear
+ >>> _clear()
+
>>> from zope.schema.vocabulary import getVocabularyRegistry
>>> registry = getVocabularyRegistry()
>>> registry.register('Permission Ids', PermissionIdsVocabulary)
More information about the Checkins
mailing list