| 2637 | @pytest.mark.onlynoncluster |
| 2638 | @skip_if_server_version_lt("8.3.224") |
| 2639 | def test_msetex_expiration_px(self, r): |
| 2640 | all_test_keys = ["1", "2"] |
| 2641 | for key in all_test_keys: |
| 2642 | r.delete(key) |
| 2643 | |
| 2644 | mapping = {"1": 1, "2": "2"} |
| 2645 | # set key/value pairs provided in mapping |
| 2646 | # with expiration - testing px field |
| 2647 | assert r.msetex(mapping=mapping, px=60000) == 1 |
| 2648 | |
| 2649 | ttls = [r.ttl(key) for key in mapping.keys()] |
| 2650 | for ttl in ttls: |
| 2651 | assert pytest.approx(ttl) == 60 |
| 2652 | assert r.mget(*mapping.keys()) == [b"1", b"2"] |
| 2653 | |
| 2654 | @pytest.mark.onlynoncluster |
| 2655 | @skip_if_server_version_lt("8.3.224") |