diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/conftest.py | 4 | ||||
-rw-r--r-- | tests/test_asyncio/test_cluster.py | 6 | ||||
-rw-r--r-- | tests/test_asyncio/test_commands.py | 2 | ||||
-rw-r--r-- | tests/test_asyncio/test_connection_pool.py | 2 | ||||
-rw-r--r-- | tests/test_asyncio/test_pipeline.py | 8 | ||||
-rw-r--r-- | tests/test_asyncio/test_pubsub.py | 2 | ||||
-rw-r--r-- | tests/test_cluster.py | 8 | ||||
-rw-r--r-- | tests/test_commands.py | 2 | ||||
-rw-r--r-- | tests/test_connection_pool.py | 2 | ||||
-rw-r--r-- | tests/test_pipeline.py | 8 |
10 files changed, 22 insertions, 22 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 3d40375..27dcc74 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -77,7 +77,7 @@ def pytest_addoption(parser): "--redis-url", default=default_redis_url, action="store", - help="Redis connection string," " defaults to `%(default)s`", + help="Redis connection string, defaults to `%(default)s`", ) parser.addoption( @@ -93,7 +93,7 @@ def pytest_addoption(parser): "--redis-ssl-url", default=default_redis_ssl_url, action="store", - help="Redis SSL connection string," " defaults to `%(default)s`", + help="Redis SSL connection string, defaults to `%(default)s`", ) parser.addoption( diff --git a/tests/test_asyncio/test_cluster.py b/tests/test_asyncio/test_cluster.py index 1997c95..13e5e26 100644 --- a/tests/test_asyncio/test_cluster.py +++ b/tests/test_asyncio/test_cluster.py @@ -171,7 +171,7 @@ async def moved_redirection_helper( prev_primary = rc.nodes_manager.get_node_from_slot(slot) if failover: if len(rc.nodes_manager.slots_cache[slot]) < 2: - warnings.warn("Skipping this test since it requires to have a " "replica") + warnings.warn("Skipping this test since it requires to have a replica") return redirect_node = rc.nodes_manager.slots_cache[slot][1] else: @@ -327,7 +327,7 @@ class TestRedisClusterObj: RedisCluster(startup_nodes=[]) assert str(ex.value).startswith( - "RedisCluster requires at least one node to discover the " "cluster" + "RedisCluster requires at least one node to discover the cluster" ), str_if_bytes(ex.value) async def test_from_url(self, request: FixtureRequest) -> None: @@ -371,7 +371,7 @@ class TestRedisClusterObj: with pytest.raises(RedisClusterException) as ex: await r.execute_command("GET") assert str(ex.value).startswith( - "No way to dispatch this command to " "Redis Cluster. Missing key." + "No way to dispatch this command to Redis Cluster. Missing key." ) async def test_execute_command_node_flag_primaries(self, r: RedisCluster) -> None: diff --git a/tests/test_asyncio/test_commands.py b/tests/test_asyncio/test_commands.py index 67471bb..7c6fd45 100644 --- a/tests/test_asyncio/test_commands.py +++ b/tests/test_asyncio/test_commands.py @@ -199,7 +199,7 @@ class TestRedisCommands: # Resets and tests that hashed passwords are set properly. hashed_password = ( - "5e884898da28047151d0e56f8dc629" "2773603d0d6aabbdd62a11ef721d1542d8" + "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8" ) assert await r.acl_setuser( username, enabled=True, reset=True, hashed_passwords=["+" + hashed_password] diff --git a/tests/test_asyncio/test_connection_pool.py b/tests/test_asyncio/test_connection_pool.py index 35f23f4..5de25f2 100644 --- a/tests/test_asyncio/test_connection_pool.py +++ b/tests/test_asyncio/test_connection_pool.py @@ -416,7 +416,7 @@ class TestConnectionPoolURLParsing: def test_invalid_extra_typed_querystring_options(self): with pytest.raises(ValueError): redis.ConnectionPool.from_url( - "redis://localhost/2?socket_timeout=_&" "socket_connect_timeout=abc" + "redis://localhost/2?socket_timeout=_&socket_connect_timeout=abc" ) def test_extra_querystring_options(self): diff --git a/tests/test_asyncio/test_pipeline.py b/tests/test_asyncio/test_pipeline.py index d613f49..3df57eb 100644 --- a/tests/test_asyncio/test_pipeline.py +++ b/tests/test_asyncio/test_pipeline.py @@ -124,7 +124,7 @@ class TestPipeline: with pytest.raises(redis.ResponseError) as ex: await pipe.execute() assert str(ex.value).startswith( - "Command # 3 (LPUSH c 3) of " "pipeline caused error: " + "Command # 3 (LPUSH c 3) of pipeline caused error: " ) # make sure the pipe was restored to a working state @@ -169,7 +169,7 @@ class TestPipeline: await pipe.execute() assert str(ex.value).startswith( - "Command # 2 (ZREM b) of " "pipeline caused error: " + "Command # 2 (ZREM b) of pipeline caused error: " ) # make sure the pipe was restored to a working state @@ -186,7 +186,7 @@ class TestPipeline: await pipe.execute() assert str(ex.value).startswith( - "Command # 2 (ZREM b) of " "pipeline caused error: " + "Command # 2 (ZREM b) of pipeline caused error: " ) # make sure the pipe was restored to a working state @@ -333,7 +333,7 @@ class TestPipeline: await pipe.execute() assert str(ex.value).startswith( - "Command # 1 (LLEN a) of " "pipeline caused error: " + "Command # 1 (LLEN a) of pipeline caused error: " ) assert await r.get("a") == b"1" diff --git a/tests/test_asyncio/test_pubsub.py b/tests/test_asyncio/test_pubsub.py index 6dedca9..37b7206 100644 --- a/tests/test_asyncio/test_pubsub.py +++ b/tests/test_asyncio/test_pubsub.py @@ -411,7 +411,7 @@ class TestPubSubMessages: with pytest.raises(RuntimeError) as info: await p.get_message() expect = ( - "connection not set: " "did you forget to call subscribe() or psubscribe()?" + "connection not set: did you forget to call subscribe() or psubscribe()?" ) assert expect in info.exconly() diff --git a/tests/test_cluster.py b/tests/test_cluster.py index 43aeb9e..e45780d 100644 --- a/tests/test_cluster.py +++ b/tests/test_cluster.py @@ -176,7 +176,7 @@ def moved_redirection_helper(request, failover=False): prev_primary = rc.nodes_manager.get_node_from_slot(slot) if failover: if len(rc.nodes_manager.slots_cache[slot]) < 2: - warnings.warn("Skipping this test since it requires to have a " "replica") + warnings.warn("Skipping this test since it requires to have a replica") return redirect_node = rc.nodes_manager.slots_cache[slot][1] else: @@ -244,7 +244,7 @@ class TestRedisClusterObj: RedisCluster(startup_nodes=[]) assert str(ex.value).startswith( - "RedisCluster requires at least one node to discover the " "cluster" + "RedisCluster requires at least one node to discover the cluster" ), str_if_bytes(ex.value) def test_from_url(self, r): @@ -265,7 +265,7 @@ class TestRedisClusterObj: with pytest.raises(RedisClusterException) as ex: r.execute_command("GET") assert str(ex.value).startswith( - "No way to dispatch this command to " "Redis Cluster. Missing key." + "No way to dispatch this command to Redis Cluster. Missing key." ) def test_execute_command_node_flag_primaries(self, r): @@ -2789,7 +2789,7 @@ class TestClusterPipeline: ask_node = node break if ask_node is None: - warnings.warn("skipping this test since the cluster has only one " "node") + warnings.warn("skipping this test since the cluster has only one node") return ask_msg = f"{r.keyslot(key)} {ask_node.host}:{ask_node.port}" diff --git a/tests/test_commands.py b/tests/test_commands.py index 12ffcfe..36d004c 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -274,7 +274,7 @@ class TestRedisCommands: # Resets and tests that hashed passwords are set properly. hashed_password = ( - "5e884898da28047151d0e56f8dc629" "2773603d0d6aabbdd62a11ef721d1542d8" + "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8" ) assert r.acl_setuser( username, enabled=True, reset=True, hashed_passwords=["+" + hashed_password] diff --git a/tests/test_connection_pool.py b/tests/test_connection_pool.py index 73eb6e1..e8a4269 100644 --- a/tests/test_connection_pool.py +++ b/tests/test_connection_pool.py @@ -314,7 +314,7 @@ class TestConnectionPoolURLParsing: def test_invalid_extra_typed_querystring_options(self): with pytest.raises(ValueError): redis.ConnectionPool.from_url( - "redis://localhost/2?socket_timeout=_&" "socket_connect_timeout=abc" + "redis://localhost/2?socket_timeout=_&socket_connect_timeout=abc" ) def test_extra_querystring_options(self): diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py index 03377d8..716cd0f 100644 --- a/tests/test_pipeline.py +++ b/tests/test_pipeline.py @@ -122,7 +122,7 @@ class TestPipeline: with pytest.raises(redis.ResponseError) as ex: pipe.execute() assert str(ex.value).startswith( - "Command # 3 (LPUSH c 3) of " "pipeline caused error: " + "Command # 3 (LPUSH c 3) of pipeline caused error: " ) # make sure the pipe was restored to a working state @@ -167,7 +167,7 @@ class TestPipeline: pipe.execute() assert str(ex.value).startswith( - "Command # 2 (ZREM b) of " "pipeline caused error: " + "Command # 2 (ZREM b) of pipeline caused error: " ) # make sure the pipe was restored to a working state @@ -184,7 +184,7 @@ class TestPipeline: pipe.execute() assert str(ex.value).startswith( - "Command # 2 (ZREM b) of " "pipeline caused error: " + "Command # 2 (ZREM b) of pipeline caused error: " ) # make sure the pipe was restored to a working state @@ -331,7 +331,7 @@ class TestPipeline: pipe.execute() assert str(ex.value).startswith( - "Command # 1 (LLEN a) of " "pipeline caused error: " + "Command # 1 (LLEN a) of pipeline caused error: " ) assert r["a"] == b"1" |