[Zope-dev] Re: AcceleratedHTTPCache and virtual hosting (collector
1447)
Florent Guillaume
fg at nuxeo.com
Tue Dec 6 05:21:27 EST 2005
Paul Winkler wrote:
> To the other respondents: Thanks for the suggestions, but I do not
> consider making AcceleratedHTTPCacheManager more flexible to be a "test
> turd". Tres outlined a real use case for changing the code (see below).
> I don't understand why you guys consider this more invasive than
> monkeypatching, which is capable of causing obscure breakage in
> far-flung tests. But thanks anyway.
Coding for testability is quite important, and is a credo of some of the
trendy methodologies these days. I consider it perfectly acceptable to have
a class attribute ConnectionClass for httplib.HTTPConnection or a method
like "getConnection" that can then be subclassed or modified during tests.
Provided it does not important performance issues.
Florent
--
Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D
+33 1 40 33 71 59 http://nuxeo.com fg at nuxeo.com
More information about the Zope-Dev
mailing list