Avoid connecting to redis backend in test environment.

This makes it also possible to test if certain background task are doing what they should do.