(client)
| 424 | |
| 425 | @pytest.mark.redismod |
| 426 | def test_json_commands_in_pipeline(client): |
| 427 | p = client.json().pipeline() |
| 428 | p.set("foo", Path.root_path(), "bar") |
| 429 | p.get("foo") |
| 430 | p.delete("foo") |
| 431 | assert p.execute() == [True, "bar", 1] |
| 432 | assert client.keys() == [] |
| 433 | assert client.get("foo") is None |
| 434 | |
| 435 | # now with a true, json object |
| 436 | client.flushdb() |
| 437 | p = client.json().pipeline() |
| 438 | d = {"hello": "world", "oh": "snap"} |
| 439 | with pytest.deprecated_call(): |
| 440 | p.jsonset("foo", Path.root_path(), d) |
| 441 | p.jsonget("foo") |
| 442 | p.exists("notarealkey") |
| 443 | p.delete("foo") |
| 444 | assert p.execute() == [True, d, 0, 1] |
| 445 | assert client.keys() == [] |
| 446 | assert client.get("foo") is None |
| 447 | |
| 448 | |
| 449 | @pytest.mark.redismod |
nothing calls this directly
no test coverage detected