(r)
| 160 | |
| 161 | @skip_if_server_version_lt("7.3.240") |
| 162 | def test_hexpireat_with_datetime(r): |
| 163 | r.delete("test:hash") |
| 164 | r.hset("test:hash", mapping={"field1": "value1", "field2": "value2"}) |
| 165 | exp_time = (datetime.now() + timedelta(seconds=2)).replace(microsecond=0) |
| 166 | assert r.hexpireat("test:hash", exp_time, "field1") == [1] |
| 167 | time.sleep(2.1) |
| 168 | assert r.hexists("test:hash", "field1") is False |
| 169 | assert r.hexists("test:hash", "field2") is True |
| 170 | |
| 171 | |
| 172 | @skip_if_server_version_lt("7.3.240") |