dmwm/WMCore — pull request #4016 by PerilousApricot (2012-08-17 20:22:57+00:00)
Title: Fixing REST unittests

There were a lot of strange bugs having to do with cherrypy keeping
global state. This commit fixes them by basically reloading all the
important variables in cherrypy.* (such as the engine and the Server).
Gross, but with this things consistently pass

Also, there's a cherrypySetup decorator that is pretty bad because it
doesn't handle the case where a server starts, then the unittest dies
(i.e. it doesn't have the teardown stuff in a finally). Either way,
those tests need to use the regular RESTBaseUnitTest stuff so that they
can properly munge cherrypy. I disabled them and am gonna open a ticket
for it (fortunately, it's only a few tsts that got disabled)