[Checkins] SVN: grokcore.security/trunk/src/grokcore/security/tests/security/protect_ Also rename test after renaming helper

Philipp von Weitershausen philikon at philikon.de
Fri Aug 1 07:55:17 EDT 2008


Log message for revision 89121:
  Also rename test after renaming helper
  

Changed:
  A   grokcore.security/trunk/src/grokcore/security/tests/security/protect_getattr.py
  D   grokcore.security/trunk/src/grokcore/security/tests/security/protect_name.py

-=-
Copied: grokcore.security/trunk/src/grokcore/security/tests/security/protect_getattr.py (from rev 89119, grokcore.security/trunk/src/grokcore/security/tests/security/protect_name.py)
===================================================================
--- grokcore.security/trunk/src/grokcore/security/tests/security/protect_getattr.py	                        (rev 0)
+++ grokcore.security/trunk/src/grokcore/security/tests/security/protect_getattr.py	2008-08-01 11:55:16 UTC (rev 89121)
@@ -0,0 +1,22 @@
+"""
+A permission has to be defined first (using grok.Permission for example)
+before it can be used in grok.require().
+
+  >>> grok.testing.grok(__name__)
+
+  >>> from zope.security.checker import ProxyFactory, getChecker
+  >>> obj = ProtectedObject()
+  >>> obj = ProxyFactory(obj)
+  >>> checker = getChecker(obj)
+  >>> checker.permission_id('protected')
+  'the.permission'
+"""
+import grokcore.security as grok
+
+class ThePermission(grok.Permission):
+    grok.name('the.permission')
+
+class ProtectedObject(grok.Context):
+    grok.require(ThePermission)
+
+    protected = 'this is protected'

Deleted: grokcore.security/trunk/src/grokcore/security/tests/security/protect_name.py
===================================================================
--- grokcore.security/trunk/src/grokcore/security/tests/security/protect_name.py	2008-08-01 11:51:21 UTC (rev 89120)
+++ grokcore.security/trunk/src/grokcore/security/tests/security/protect_name.py	2008-08-01 11:55:16 UTC (rev 89121)
@@ -1,22 +0,0 @@
-"""
-A permission has to be defined first (using grok.Permission for example)
-before it can be used in grok.require().
-
-  >>> grok.testing.grok(__name__)
-
-  >>> from zope.security.checker import ProxyFactory, getChecker
-  >>> obj = ProtectedObject()
-  >>> obj = ProxyFactory(obj)
-  >>> checker = getChecker(obj)
-  >>> checker.permission_id('protected')
-  'the.permission'
-"""
-import grokcore.security as grok
-
-class ThePermission(grok.Permission):
-    grok.name('the.permission')
-
-class ProtectedObject(grok.Context):
-    grok.require(ThePermission)
-
-    protected = 'this is protected'



More information about the Checkins mailing list