From 7bc202d1fa3c54aba1eceb0e9213e3e54aec2e49 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Mon, 23 Aug 2021 16:34:21 +0300 Subject: flake8 --- tests/test_sentinel.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_sentinel.py b/tests/test_sentinel.py index cb59911..54cf262 100644 --- a/tests/test_sentinel.py +++ b/tests/test_sentinel.py @@ -35,8 +35,10 @@ class SentinelTestClient: from redis.client import bool_ok return bool_ok + class SentinelTestCluster: - def __init__(self, servisentinel_ce_name='mymaster', ip='127.0.0.1', port=6379): + def __init__(self, servisentinel_ce_name='mymaster', ip='127.0.0.1', + port=6379): self.clients = {} self.master = { 'ip': ip, @@ -83,6 +85,7 @@ def test_discover_master(sentinel, master_ip): address = sentinel.discover_master('mymaster') assert address == (master_ip, 6379) + def test_discover_master_error(sentinel): with pytest.raises(MasterNotFoundError): sentinel.discover_master('xxx') @@ -202,12 +205,15 @@ def test_slave_round_robin(cluster, sentinel, master_ip): with pytest.raises(SlaveNotFoundError): next(rotator) + def test_ckquorum(cluster, sentinel): assert sentinel.sentinel_ckquorum("mymaster") + def test_flushconfig(cluster, sentinel): assert sentinel.sentinel_flushconfig() + def test_reset(cluster, sentinel): cluster.master['is_odown'] = True assert sentinel.sentinel_reset('mymaster') -- cgit v1.2.1