praekelt/vumi — Issue #121: Create infrastructure for running the entire test suite using the actual Python redis rather than FakeRedis
Author: hodgestar
Created: 2012-01-11 16:43:23+00:00
State: open

Currently we use a mocked-out Redis for testing but it would be good to be able to run the test suite against real Redis from time to time.

Elements of a possible solution:

* Have an environment variable (VUMI_TEST_REAL_REDIS?) that causes the tests to run against real redis when present. The environment variable could perhaps encode the dbindex?

* We'd need to clean all the keys out of the Redis database in between tests (otherwise tests would have to clear up after themselves).

* Replace the explicit construction of FakeRedis with perhaps a VumiTest base class that includes a method like .get_redis() that returns either FakeRedis() or a real redis and cleans them up appropriately when done?