diff options
author | Greg Melton <gmelton@gmail.com> | 2022-05-23 01:51:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-23 11:51:53 +0300 |
commit | 8a1feb397bce1d76593496fd57bf6d157d1ccbe9 (patch) | |
tree | 2027dc00c227e085b71e38909df42726c7ff8e1f | |
parent | 428510b5786c70a26a8797b8eb33b89777132884 (diff) | |
download | redis-py-8a1feb397bce1d76593496fd57bf6d157d1ccbe9.tar.gz |
Fix Linting and Test Failures (#2191)
* force triggering pr pipeline
* fix lint error
* https://github.com/RedisJSON/RedisJSON/pull/721 no longer clears strings or boolean scalars
-rw-r--r-- | redis/commands/search/commands.py | 2 | ||||
-rw-r--r-- | tests/test_asyncio/test_json.py | 5 | ||||
-rw-r--r-- | tests/test_json.py | 5 |
3 files changed, 6 insertions, 6 deletions
diff --git a/redis/commands/search/commands.py b/redis/commands/search/commands.py index 5a9f6fe..10b5762 100644 --- a/redis/commands/search/commands.py +++ b/redis/commands/search/commands.py @@ -167,7 +167,7 @@ class SearchCommands: ### Parameters: - **delete_documents**: If `True`, all documents will be deleted. - + For more information see `FT.DROPINDEX <https://redis.io/commands/ft.dropindex>`_. """ # noqa keep_str = "" if delete_documents else "KEEPDOCS" diff --git a/tests/test_asyncio/test_json.py b/tests/test_asyncio/test_json.py index 6bd9581..c203c6d 100644 --- a/tests/test_asyncio/test_json.py +++ b/tests/test_asyncio/test_json.py @@ -899,11 +899,12 @@ async def test_clear_dollar(modclient: redis.Redis): "nested3": {"a": {"baz": 50}}, }, ) + # Test multi - assert await modclient.json().clear("doc1", "$..a") == 4 + assert await modclient.json().clear("doc1", "$..a") == 3 assert await modclient.json().get("doc1", "$") == [ - {"nested1": {"a": {}}, "a": [], "nested2": {"a": ""}, "nested3": {"a": {}}} + {"nested1": {"a": {}}, "a": [], "nested2": {"a": "claro"}, "nested3": {"a": {}}} ] # Test single diff --git a/tests/test_json.py b/tests/test_json.py index 3d9b678..2b75456 100644 --- a/tests/test_json.py +++ b/tests/test_json.py @@ -893,7 +893,6 @@ def test_type_dollar(client): @pytest.mark.redismod def test_clear_dollar(client): - client.json().set( "doc1", "$", @@ -905,10 +904,10 @@ def test_clear_dollar(client): }, ) # Test multi - assert client.json().clear("doc1", "$..a") == 4 + assert client.json().clear("doc1", "$..a") == 3 assert client.json().get("doc1", "$") == [ - {"nested1": {"a": {}}, "a": [], "nested2": {"a": ""}, "nested3": {"a": {}}} + {"nested1": {"a": {}}, "a": [], "nested2": {"a": "claro"}, "nested3": {"a": {}}} ] # Test single |