зеркало из https://github.com/mozilla/nuggets.git
every good setup deserves a teardown
This commit is contained in:
Родитель
6a8fc077f1
Коммит
502a84634e
|
@ -33,7 +33,15 @@ if not connections: # don't set this repeatedly
|
|||
|
||||
|
||||
def mock_redis():
|
||||
connections['master'] = MockRedis()
|
||||
ret = dict(connections)
|
||||
for key in connections:
|
||||
connections[key] = MockRedis()
|
||||
return ret
|
||||
|
||||
|
||||
def reset_redis(cxn):
|
||||
for key, value in cxn.items():
|
||||
connections[key] = value
|
||||
|
||||
|
||||
class MockRedis(object):
|
||||
|
|
Загрузка…
Ссылка в новой задаче