Exemple #1
0
def test_get_multi_prefix(mock_cache):
    redis, clock = mock_cache
    cache.set("test-foo1", "bar1")
    cache.set("test-foo2", "bar2")
    assert cache.get_multi(["foo1", "foo2"], key_prefix="test-") == {
        "foo1": "bar1",
        "foo2": "bar2"
    }
Exemple #2
0
def test_get_multi(mock_cache):
    redis, clock = mock_cache
    cache.set("foo1", "bar1")
    cache.set("foo2", "bar2")
    assert cache.get_multi(["foo1", "foo2"]) == {
        "foo1": "bar1",
        "foo2": "bar2"
    }
Exemple #3
0
def test_get_multi_prefix(mock_cache):
    redis, clock = mock_cache
    cache.set("test-foo1", "bar1")
    cache.set("test-foo2", "bar2")
    assert cache.get_multi(["foo1", "foo2"], key_prefix="test-") == {"foo1": "bar1", "foo2": "bar2"}
Exemple #4
0
def test_get_multi(mock_cache):
    redis, clock = mock_cache
    cache.set("foo1", "bar1")
    cache.set("foo2", "bar2")
    assert cache.get_multi(["foo1", "foo2"]) == {"foo1": "bar1", "foo2": "bar2"}