(r)
| 149 | |
| 150 | @skip_if_server_version_lt("7.3.240") |
| 151 | def test_hexpireat_basic(r): |
| 152 | r.delete("test:hash") |
| 153 | r.hset("test:hash", mapping={"field1": "value1", "field2": "value2"}) |
| 154 | exp_time = math.ceil((datetime.now() + timedelta(seconds=1)).timestamp()) |
| 155 | assert r.hexpireat("test:hash", exp_time, "field1") == [1] |
| 156 | time.sleep(2.1) |
| 157 | assert r.hexists("test:hash", "field1") is False |
| 158 | assert r.hexists("test:hash", "field2") is True |
| 159 | |
| 160 | |
| 161 | @skip_if_server_version_lt("7.3.240") |