MCPcopy
hub / github.com/redis/redis-py / test_json_setgetdeleteforget

Function test_json_setgetdeleteforget

tests/test_json.py:32–38  ·  view source on GitHub ↗
(client)

Source from the content-addressed store, hash-verified

30
31@pytest.mark.redismod
32def test_json_setgetdeleteforget(client):
33 assert client.json().set("foo", Path.root_path(), "bar")
34 assert client.json().get("foo") == "bar"
35 assert client.json().get("baz") is None
36 assert client.json().delete("foo") == 1
37 assert client.json().forget("foo") == 0 # second delete
38 assert client.exists("foo") == 0
39
40
41@pytest.mark.redismod

Callers

nothing calls this directly

Calls 6

root_pathMethod · 0.80
setMethod · 0.45
jsonMethod · 0.45
getMethod · 0.45
deleteMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected