Yeah... the time() stuff wouldn't be too tricky to do without mocking but I am unsure about the benefit of implementing a tunnel server to test the _tunnel_host() bits.