Code review comment for lp:~leonardr/lazr.restful/make-test-class-public

Revision history for this message
Leonard Richardson (leonardr) wrote :

lazr.restful's unit test file test_webservice.py used to have a class called WebServiceTestCase that would set up a dummy web service and run some unit tests against it. Over time, the amount of setup work necessary increased, to the point where WSTC was basically setting up a fully functional web service.

When integrating a new lazr.restful version into Launchpad, I noticed that Launchpad also had unit tests that ran against a web service, and that I could save myself a lot of trouble by writing unit tests that subclassed WebServiceTestCase. I did this, but I pledged to come back and move WSTC (and its dependent classes) into lazr.restful.testing.webservice, so that Launchpad wouldn't be importing classes from a lazr.restful unit test module.

This branch does basically that, and nothing else. The one fix I made in passing was to change SimpleWebServiceConfiguration.createRequest to use the utility function tag_request_with_version_name(), replacing code that was basically a copy of tag_request_with_version_name. I also had to change the WADL unit tests, because I fleshed out the doctest strings of IGenericEntry and IGenericConfiguration.

« Back to merge proposal