Update tests to work offline

There are still some that we cannot force to work offline but this improves a lot of things.
Feedback from IRC (@alex in particular): just use enumerate for this loop to eliminate the need to use `i` as a counter