Skip to content

Commit

Permalink
Merge branch 'master' into CF.MEXISTS
Browse files Browse the repository at this point in the history
  • Loading branch information
dvora-h authored May 23, 2022
2 parents 8319ed2 + 8a1feb3 commit cace8fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions tests/test_asyncio/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions tests/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,6 @@ def test_type_dollar(client):

@pytest.mark.redismod
def test_clear_dollar(client):

client.json().set(
"doc1",
"$",
Expand All @@ -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
Expand Down

0 comments on commit cace8fd

Please sign in to comment.