| 5399 | assert r.hmget("encodable-hash", bytearray(b"field-bytes")) == [b"value-bytes"] |
| 5400 | |
| 5401 | def test_hset_with_multi_key_values(self, r): |
| 5402 | r.hset("a", mapping={"1": 1, "2": 2, "3": 3}) |
| 5403 | assert r.hget("a", "1") == b"1" |
| 5404 | assert r.hget("a", "2") == b"2" |
| 5405 | assert r.hget("a", "3") == b"3" |
| 5406 | |
| 5407 | r.hset("b", "foo", "bar", mapping={"1": 1, "2": 2}) |
| 5408 | assert r.hget("b", "1") == b"1" |
| 5409 | assert r.hget("b", "2") == b"2" |
| 5410 | assert r.hget("b", "foo") == b"bar" |
| 5411 | |
| 5412 | def test_hset_with_key_values_passed_as_list(self, r): |
| 5413 | r.hset("a", items=["1", 1, "2", 2, "3", 3]) |