[Zope-PAS] Re: Test layers for pastc

2007-11-19 Thread Ross Patterson
Tres Seaver [EMAIL PROTECTED] writes:

 Ross Patterson wrote:

 I'd love to convert PAS's tests to layers for test setUp and tearDown.
 Any objections?

 Layers are all about sharing setup across a set of tests, which means
 they risk breaking test isolation.  I normally don't use layers for
 anything which is a pure unit test, but can see the point for
 function or integration tests.

 Are there a specific set of tests you have in mind which have
 significant setup / teardown costs?

Well I also find that layers make factoring and re-using setup much
easier, so that was my motivation.  If that's an abuse of the intentions
of layers, then nevermind.  :)

Ross

___
Zope-PAS mailing list
Zope-PAS@zope.org
http://mail.zope.org/mailman/listinfo/zope-pas


[Zope-PAS] Getting PAS users to show up in the access log/Z2.log

2007-08-23 Thread Ross Patterson
It seems like ZServer/medusa/http_server.py is responsible for logging
requests to the access log/Z2.log and it only extracts the user from the
HTTP basic auth header.

I'd like to have the Z2.log reflect my PAS users so I started a branch at
http://svn.zope.org/PluggableAuthService/branches/rossp-access-log/ that
hacks some request data.  You can see the meat of it in the following
changeset:

http://svn.zope.org/PluggableAuthService/branches/rossp-access-log/PluggableAuthService.py?view=diffr1=79171r2=79170

I'm sure this is just about the worst way to do this.  :)  I just wanted
to get the discussion started.

I suspect that ZServer/medusa/http_server.py is only invoved for certain
Zope setups and that other Zope setups (twisted, etc.?) might log
differently.

So what would be a better way to approach this?  Does anyone else have a
solution to this problem?

Ross

___
Zope-PAS mailing list
Zope-PAS@zope.org
http://mail.zope.org/mailman/listinfo/zope-pas


[Zope-PAS] Re: Duplicate pulgin types created by PluginRegistry.exportimport._updatePluginRegistry

2006-12-19 Thread Ross Patterson
Tres Seaver [EMAIL PROTECTED] writes:

 Thanks! Can you please add to the PAS collector so we don't lose the patch:

   http://www.zope.org/Collectors/PAS

Will do.

 I don't understand the need for this handler, or why your overrides.zcml
 uses it for IPluginRegistry.  The normal handers for PAS plugins are
 all in PAS itself, and the normal one for the registry is in
 PluginRegsitry.

As I understand it, the PAS setup handlers expect the setup tool to be
located *inside* the acl_users folder.  I taks this from the fact that
the setup handlers get the adapter that does the actual importing and
exporting with an adapter for context.getSite().

I wanted to be able to do PAS configuration in a setuphandler executed
inside a setup tool for a CMF *portal* for the acl_users folder
*subobject* of that portal.  As such I adapt
getToolByName(context.getSite(), 'acl_users').

Is this incorrect?

Ross

___
Zope-PAS mailing list
Zope-PAS@zope.org
http://mail.zope.org/mailman/listinfo/zope-pas