Skip to content

Commit 3b09eee

Browse files
committed
fix tests
1 parent dc28a4f commit 3b09eee

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

tests/test_asyncio/test_monitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ async def test_lua_script(self, r):
5959
async def test_lua_script_in_enterprise(self, r):
6060
async with r.monitor() as m:
6161
script = 'return redis.call("GET", "foo")'
62-
assert await r.eval(script, 0) is None
62+
assert await r.eval(script, 1, "foo") is None
6363
response = await wait_for_command(r, m, "GET foo")
6464
assert response is None

tests/test_asyncio/test_sentinel.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
SentinelConnectionPool,
1212
SlaveNotFoundError,
1313
)
14+
from tests.conftest import skip_if_redis_enterprise
1415

1516

1617
@pytest_asyncio.fixture(scope="module")
@@ -182,6 +183,7 @@ async def test_discover_slaves(cluster, sentinel):
182183

183184

184185
@pytest.mark.onlynoncluster
186+
@skip_if_redis_enterprise()
185187
async def test_master_for(cluster, sentinel, master_ip):
186188
async with sentinel.master_for("mymaster", db=9) as master:
187189
assert await master.ping()
@@ -193,6 +195,7 @@ async def test_master_for(cluster, sentinel, master_ip):
193195

194196

195197
@pytest.mark.onlynoncluster
198+
@skip_if_redis_enterprise()
196199
async def test_slave_for(cluster, sentinel):
197200
cluster.slaves = [
198201
{"ip": "127.0.0.1", "port": 6379, "is_odown": False, "is_sdown": False}

tests/test_monitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ def test_lua_script(self, r):
6262
def test_lua_script_in_enterprise(self, r):
6363
with r.monitor() as m:
6464
script = 'return redis.call("GET", "foo")'
65-
assert r.eval(script, 0) is None
65+
assert r.eval(script, 1, "foo") is None
6666
response = wait_for_command(r, m, "GET foo")
6767
assert response is None

tests/test_sentinel.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
SentinelConnectionPool,
1111
SlaveNotFoundError,
1212
)
13+
from tests.conftest import skip_if_redis_enterprise
1314

1415

1516
@pytest.fixture(scope="module")
@@ -99,6 +100,7 @@ def test_discover_master_error(sentinel):
99100

100101

101102
@pytest.mark.onlynoncluster
103+
@skip_if_redis_enterprise()
102104
def test_dead_pool(sentinel):
103105
master = sentinel.master_for("mymaster", db=9)
104106
conn = master.connection_pool.get_connection("_")
@@ -184,6 +186,7 @@ def test_discover_slaves(cluster, sentinel):
184186

185187

186188
@pytest.mark.onlynoncluster
189+
@skip_if_redis_enterprise()
187190
def test_master_for(cluster, sentinel, master_ip):
188191
master = sentinel.master_for("mymaster", db=9)
189192
assert master.ping()
@@ -195,6 +198,7 @@ def test_master_for(cluster, sentinel, master_ip):
195198

196199

197200
@pytest.mark.onlynoncluster
201+
@skip_if_redis_enterprise()
198202
def test_slave_for(cluster, sentinel):
199203
cluster.slaves = [
200204
{"ip": "127.0.0.1", "port": 6379, "is_odown": False, "is_sdown": False}

tests/test_ssl.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@
66
import redis
77
from redis.exceptions import ConnectionError, RedisError
88

9-
from .conftest import skip_if_cryptography, skip_if_nocryptography
9+
from .conftest import (
10+
skip_if_cryptography,
11+
skip_if_nocryptography,
12+
skip_if_redis_enterprise,
13+
)
1014
from .ssl_utils import get_ssl_filename
1115

1216

1317
@pytest.mark.ssl
18+
@skip_if_redis_enterprise()
1419
class TestSSL:
1520
"""Tests for SSL connections
1621

0 commit comments

Comments
 (0)