[Zope-dev] AcceleratedHTTPCache and virtual hosting (collector 1447)

Dieter Maurer dieter at handshake.de
Sun Dec 4 13:13:39 EST 2005


Jens Vagelpohl wrote at 2005-12-3 16:08 +0000:
> ...
>> Another thought: Maybe before doing anything else, I should make the
>> client class used by AcceleratedHTTPCache configurable, so I can more
>> easily get a mock in there.  Something like:
>
>I like the secondary route, but I'm not sure the production code  
>should contain "testing only" turds. :)

We could use monkey patching for this -- used only for testing purposes.


The "five" people included a small piece of my software
("ReuseUtils.rebind.rebindFunction") in "five" (therefore,
it should now be somewhere in Zope 2.8 and above) which
makes monkey patching such as replacing "httplib" by some
mockup rather painless (i.e. without copying code to be tested).

-- 
Dieter


More information about the Zope-Dev mailing list