| 126 | |
| 127 | @skip_if_server_version_lt("7.3.240") |
| 128 | def test_hpexpire_multiple_fields(r): |
| 129 | r.delete("test:hash") |
| 130 | r.hset( |
| 131 | "test:hash", |
| 132 | mapping={"field1": "value1", "field2": "value2", "field3": "value3"}, |
| 133 | ) |
| 134 | assert r.hpexpire("test:hash", 500, "field1", "field2") == [1, 1] |
| 135 | time.sleep(0.6) |
| 136 | assert r.hexists("test:hash", "field1") is False |
| 137 | assert r.hexists("test:hash", "field2") is False |
| 138 | assert r.hexists("test:hash", "field3") is True |
| 139 | |
| 140 | |
| 141 | @skip_if_server_version_lt("7.3.240") |