tests for torrent.py