Fix tests to run with latest Twisted.