| 132 | |
| 133 | @skip_if_server_version_lt("7.3.240") |
| 134 | async def test_hexpireat_basic(r): |
| 135 | await r.delete("test:hash") |
| 136 | await r.hset("test:hash", mapping={"field1": "value1", "field2": "value2"}) |
| 137 | exp_time = math.ceil((datetime.now() + timedelta(seconds=1)).timestamp()) |
| 138 | assert await r.hexpireat("test:hash", exp_time, "field1") == [1] |
| 139 | await asyncio.sleep(2.1) |
| 140 | assert await r.hexists("test:hash", "field1") is False |
| 141 | assert await r.hexists("test:hash", "field2") is True |
| 142 | |
| 143 | |
| 144 | @skip_if_server_version_lt("7.3.240") |