Make Redis completely optional:

* Move Redis code into fakeldap, since it's the only thing that still uses it.
 * Adjust auth unittests to skip fakeldap tests if Redis isn't around.
 * Adjust auth unittests to actually run the fakeldap tests if Redis /is/ around.
This commit is contained in:
Soren Hansen
2010-10-15 15:18:40 +00:00
committed by Tarmac
5 changed files with 45 additions and 68 deletions

View File

@@ -202,7 +202,7 @@ class AuthManager(object):
def __new__(cls, *args, **kwargs):
"""Returns the AuthManager singleton"""
if not cls._instance:
if not cls._instance or ('new' in kwargs and kwargs['new']):
cls._instance = super(AuthManager, cls).__new__(cls)
return cls._instance