[Zope3-checkins] CVS: Zope3/src/zope/app/security/tests - test_zopepolicy.py:1.5

Guido van Rossum guido@python.org
Mon, 3 Mar 2003 18:16:43 -0500


Update of /cvs-repository/Zope3/src/zope/app/security/tests
In directory cvs.zope.org:/tmp/cvs-serv7820/src/zope/app/security/tests

Modified Files:
	test_zopepolicy.py 
Log Message:
Merge from use-config-branch.  (A joint production by Jim, Tim and Guido.)

- Refactor the service creation and configuration code, making the UI
  for creating and configuring services much more pleasant.

- Add a new marker interface, IUseConfigurable, which is used to say
  that an object records dependencies between it and its
  configurations.  (This applies to other configurable objects besides
  services.)  Another marker interface, IAttributeUseConfigurable,
  says that these dependencies are stored as annotations.  And finally
  IUseConfiguration defines the actual interface for discussing these
  dependencies; implementing IUseConfigurable is a promise that such
  an adapter exists (and implementing IAttributeUseConfigurable is one
  way of making this promise come true :-).

- Add a new view tab for services, called "Configurations", which
  displays links to its configurations with summary information.  (Try
  it for the Events service, which has two configurations by default.)

- Add a new interface, ILocalService, which all local services must
  implement.  Also add ISimpleService, which extends ILocalService
  with IAttributeUseConfigurable.  All existing local service
  implementations implement this.

- Some miscellaneous cleanup (e.g. made the browser namespace the
  default namespace in zope/app/browser/services/configure.zcml).


=== Zope3/src/zope/app/security/tests/test_zopepolicy.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/security/tests/test_zopepolicy.py:1.4	Tue Feb 11 21:17:33 2003
+++ Zope3/src/zope/app/security/tests/test_zopepolicy.py	Mon Mar  3 18:16:12 2003
@@ -52,6 +52,7 @@
 from zope.app.services.tests.placefulsetup\
            import PlacefulSetup
 from zope.app.security.zopepolicy import permissionsOfPrincipal
+from zope.app.interfaces.services.interfaces import ISimpleService
 
 class Context:
     def __init__(self, user, stack=[]):
@@ -65,7 +66,7 @@
 
 class AuthService:
     """we only implement what we need for testing here"""
-    __implements__ = IAuthenticationService
+    __implements__ = IAuthenticationService, ISimpleService
     def __init__(self):
         self.data = {'jim': Principal('jim','Jim','Jim Fulton')}
     def getPrincipal(self, id):