~homeworkprod/byceps

ref: 2341dbab389243c259f2ab90020227d133e4d16c byceps/tests/mocks.py -rw-r--r-- 257 bytes
2341dbab — Jochen Kupperschmidt Remove party object from `g` thread-local 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""
tests.mocks
~~~~~~~~~~~

:Copyright: 2006-2017 Jochen Kupperschmidt
"""

from unittest.mock import MagicMock

from redis import StrictRedis


def strict_redis_client_from_url(url):
    mock = MagicMock()
    mock.__class__ = StrictRedis
    return mock