Enable deprecation warnings in tests in Python 2.7.

This also revealed a deprecated call to cgi.parse_qsl.