The one in ZopeTestCase.utils is also meant to play with startZServer
(same module). I agree that the one in Testing.makerequest could
probably gain ACTUAL_URL, and maybe even the request._steps hack to
make URL1 and friends available...
However, I have not seen these URL vars used anywhere but templates
and DTML. ZTC adds them because it's used quite heavily for
integration and functional testing(*). Also note that the values are
faked, i.e. they are present but contain dummy values. In real-life
they would be maintained by traversal, and no traversal takes place
in unit tests.
If you use ZTC you will automatically get an app object wrapped by
utils.makerequest. If you don't use ZTC, I guess it depends on
whether you think you will need ACTUAL_URL often enough to warrant
adding it to Testing.makerequest. I don't think that's the case but
(*) To be honest they where likely added for Plone, now shoot me.
On 4. Apr 2006, at 17:37, Paul Winkler wrote:
Stefan, do you have any insight into my first question?
1) there is a "makerequest" function in both Testing/makerequest.py
and Testing/ZopeTestCase/utils.py. They are subtly different.
Is there a deliberate reason for this? I notice that ... (snip)
the one in makerequest.py lacks an ACTUAL_URL.
If there's no reason for the implementations to differ,
I can delete one definition and just import the other in its place.
Anything that happens, happens. --Douglas Adams
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -