[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security/tests - testProtectClass.py:1.1.2.14.2.2 testPublicClass.py:1.1.2.14.2.2
Jim Fulton
jim@zope.com
Mon, 3 Jun 2002 14:25:37 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security/tests
In directory cvs.zope.org:/tmp/cvs-serv14482/lib/python/Zope/App/Security/tests
Modified Files:
Tag: Zope3InWonderland-branch
testProtectClass.py testPublicClass.py
Log Message:
Changed list attribute syntax to be more XML standard.
In particular, list attributes now expect items to be separated by
whitespace, rather than commas.
=== Zope3/lib/python/Zope/App/Security/tests/testProtectClass.py 1.1.2.14.2.1 => 1.1.2.14.2.2 ===
declaration = ("""<security:protectClass
class="%s" permission="%s"
- names="m1, m3" />"""
+ names="m1 m3" />"""
% (PREFIX+"test_class", P1))
self.assertDeclaration(declaration,
instP=P1, m1P=P1, m3P=P1)
@@ -149,7 +149,7 @@
def testCompositeMethodsPluralTopPerm(self):
declaration = ("""<security:protectClass class="%s" permission="%s">
- <security:protect names="m1, m2"/>
+ <security:protect names="m1 m2"/>
</security:protectClass>"""
% (PREFIX+"test_class", P1))
self.assertDeclaration(declaration,
@@ -158,7 +158,7 @@
def testCompositeMethodsPluralElementPerm(self):
declaration = ("""<security:protectClass class="%s">
<security:protect permission="%s"
- names="m1, m3"/>
+ names="m1 m3"/>
</security:protectClass>"""
% (PREFIX+"test_class", P1))
self.assertDeclaration(declaration,
@@ -200,7 +200,7 @@
def testLikeUntoOnly(self):
declaration = ("""
- <security:protectClass class="%s" names="m1,m2" permission="%s" />
+ <security:protectClass class="%s" names="m1 m2" permission="%s" />
<security:protectClass class="%s" like_unto="%s" />
""" % (PREFIX+"test_base", P1,
PREFIX+"test_class", PREFIX+"test_base"))
@@ -211,9 +211,9 @@
def testLikeUntoAsDefault(self):
declaration = ("""
- <security:protectClass class="%s" names="m1,m2" permission="%s" />
+ <security:protectClass class="%s" names="m1 m2" permission="%s" />
<security:protectClass class="%s" like_unto="%s"
- names="m2,m3" permission="%s"/>
+ names="m2 m3" permission="%s"/>
""" % (PREFIX+"test_base", P1,
PREFIX+"test_class", PREFIX+"test_base", P2))
# m1 and m2 are in the interface, so should be set, and m3 should not:
=== Zope3/lib/python/Zope/App/Security/tests/testPublicClass.py 1.1.2.14.2.1 => 1.1.2.14.2.2 ===
<zopeConfigure xmlns='http://namespaces.zope.org/zope'>
<directive name="publicClass"
- attributes="class, interface, methods"
+ attributes="class interface methods"
namespace="http://namespaces.zope.org/security"
handler="Zope.App.Security.publicClass." />
</zopeConfigure>
@@ -94,7 +94,7 @@
def testMethodsPlural(self):
declaration = ("""<security:publicClass
- class="%s" names="m1, m3" />"""
+ class="%s" names="m1 m3" />"""
% (PREFIX+"test_class"))
self.assertDeclaration(declaration,
instP=PublicPermission, m1P=PublicPermission,