(self, r, r2)
| 787 | @pytest.mark.onlynoncluster |
| 788 | @skip_if_server_version_lt("2.6.9") |
| 789 | def test_client_kill(self, r, r2): |
| 790 | r.client_setname("redis-py-c1") |
| 791 | r2.client_setname("redis-py-c2") |
| 792 | clients = [ |
| 793 | client |
| 794 | for client in r.client_list() |
| 795 | if client.get("name") in ["redis-py-c1", "redis-py-c2"] |
| 796 | ] |
| 797 | assert len(clients) == 2 |
| 798 | |
| 799 | clients_by_name = {client.get("name"): client for client in clients} |
| 800 | |
| 801 | client_addr = clients_by_name["redis-py-c2"].get("addr") |
| 802 | assert r.client_kill(client_addr) is True |
| 803 | |
| 804 | clients = [ |
| 805 | client |
| 806 | for client in r.client_list() |
| 807 | if client.get("name") in ["redis-py-c1", "redis-py-c2"] |
| 808 | ] |
| 809 | assert len(clients) == 1 |
| 810 | assert clients[0].get("name") == "redis-py-c1" |
| 811 | |
| 812 | @skip_if_server_version_lt("2.8.12") |
| 813 | def test_client_kill_filter_invalid_params(self, r): |
nothing calls this directly
no test coverage detected