[tor-commits] [tor/master] test: Move some test code to test helpers.