Ejemplo n.º 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"
    }
Ejemplo n.º 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"
    }
Ejemplo n.º 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"}
Ejemplo n.º 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"}