Code review comment for lp:~gary/launchpad/lazr-dist

Revision history for this message
Gary Poster (gary) wrote :

This branch converts us to using the newest versions of our own packages, via Python disributions:

launchpadlib
lazr.batchnavigator
lazr.config
lazr.delegates
lazr.enum
lazr.lifecycle
lazr.restful
lazr.restfulclient
wadllib

Many of the lines in the diff are because the underlying machinery of the lazr.restful testing helpers changed. It moved from relying on a zope functional testing framework to wsgi_intercept. This meant that I had to add some new testing helpers in the launchpad layer machinery (see lib/canonical/testing/layers.py); and the API of the webservice test helper (and its results) changed, so tests changed.

As an interesting side result, it's quite possible that we will be able to use launchpadlib within our functional tests now, or with a two line change to hook up wsgi_intercept in a different way.

An aspect of this worth particular note is that the webservice needs to have its domain set explicitly if you change domains. You can see this in the xx-service.txt diff, for instance.

I increased the timeout in lib/canonical/launchpad/testing/googletestservice.py because it helped me on my machine. I'm willing to change it back, but it seems pretty harmless to me.

In lib/canonical/launchpad/testing/pages.py, I remove "port" from calling the LaunchpadWebServiceCaller. It was ignored before, and I didn't see any reason to add it back. Perhaps the comment that explains its absence is unnecessary, though.

The MockRootFolder is added back to lib/canonical/lazr/testing/layers.py because it is no longer found in lazr.restful.

The STAGGER_RETRIES code in lib/canonical/testing/layers.py was something I removed in my earlier zbuildout branch but should be added back. We can't remove it until we move to a newer version of zope.publisher, which we can't do yet because of other issues I won't get into right now.

« Back to merge proposal