Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test_memcached.py #228

Merged
merged 3 commits into from
May 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/test_memcached.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ def test_uses_pylibmc_client(self):

def test_dont_use_pylibmc_client(self):
from beaker.ext.memcached import _load_client
load_mock = mock.Mock()
load_mock = unittest.mock.Mock()
load_mock.return_value = _load_client('memcache')
with mock.patch('beaker.ext.memcached._load_client', load_mock):
with unittest.mock.patch('beaker.ext.memcached._load_client', load_mock):
cache = Cache('test', data_dir='./cache', url=mc_url, type="ext:memcached")
assert not isinstance(cache.namespace, memcached.PyLibMCNamespaceManager)
assert isinstance(cache.namespace, memcached.MemcachedNamespaceManager)
Expand Down