Fix tests that break with Twisted 14.0

They dig around in `Agent`'s privates.