Fix a couple of warnings in the test suite code

* Use TestCase.assertEqual in lieu of the deprecated TestCase.assertEquals.
* Explicitly close the wsgiref server's socket.

Change-Id: I285c188b60d2cce580f9568f818b10bec2572383