[Checkins]
SVN: grok/branches/jw-define-roles-directive/src/grok/tests/security/missing_permission_name.py
Add a test for grok.Permission.
Jan-Wijbrand Kolman
janwijbrand at gmail.com
Mon Aug 20 10:51:34 EDT 2007
Log message for revision 79032:
Add a test for grok.Permission.
Changed:
A grok/branches/jw-define-roles-directive/src/grok/tests/security/missing_permission_name.py
-=-
Copied: grok/branches/jw-define-roles-directive/src/grok/tests/security/missing_permission_name.py (from rev 79029, grok/branches/jw-define-roles-directive/src/grok/tests/security/missing_role_name.py)
===================================================================
--- grok/branches/jw-define-roles-directive/src/grok/tests/security/missing_permission_name.py (rev 0)
+++ grok/branches/jw-define-roles-directive/src/grok/tests/security/missing_permission_name.py 2007-08-20 14:51:33 UTC (rev 79032)
@@ -0,0 +1,15 @@
+"""
+A role has to have a name to be defined.
+
+ >>> grok.grok(__name__)
+ Traceback (most recent call last):
+ ...
+ GrokError: A permission needs to have a dotted name for its id.
+ Use grok.name to specify one.
+"""
+
+import grok
+import zope.interface
+
+class MissingName(grok.Permission):
+ pass
More information about the Checkins
mailing list