Skip to content

Disabling JSON.DEBUG tests #1787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions tests/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ def test_strappend(client):
assert "foobar" == client.json().get("jsonkey", Path.rootPath())


@pytest.mark.redismod
def test_debug(client):
client.json().set("str", Path.rootPath(), "foo")
assert 24 == client.json().debug("MEMORY", "str", Path.rootPath())
assert 24 == client.json().debug("MEMORY", "str")

# technically help is valid
assert isinstance(client.json().debug("HELP"), list)
# @pytest.mark.redismod
# def test_debug(client):
# client.json().set("str", Path.rootPath(), "foo")
# assert 24 == client.json().debug("MEMORY", "str", Path.rootPath())
# assert 24 == client.json().debug("MEMORY", "str")
#
# # technically help is valid
# assert isinstance(client.json().debug("HELP"), list)


@pytest.mark.redismod
Expand Down Expand Up @@ -969,27 +969,27 @@ def test_toggle_dollar(client):
client.json().toggle("non_existing_doc", "$..a")


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

jdata, jtypes = load_types_data("a")

client.json().set("doc1", "$", jdata)

# Test multi
assert client.json().debug("MEMORY", "doc1", "$..a") == [72, 24, 24, 16, 16, 1, 0]

# Test single
assert client.json().debug("MEMORY", "doc1", "$.nested2.a") == [24]

# Test legacy
assert client.json().debug("MEMORY", "doc1", "..a") == 72

# Test missing path (defaults to root)
assert client.json().debug("MEMORY", "doc1") == 72

# Test missing key
assert client.json().debug("MEMORY", "non_existing_doc", "$..a") == []
# @pytest.mark.redismod
# def test_debug_dollar(client):
#
# jdata, jtypes = load_types_data("a")
#
# client.json().set("doc1", "$", jdata)
#
# # Test multi
# assert client.json().debug("MEMORY", "doc1", "$..a") == [72, 24, 24, 16, 16, 1, 0]
#
# # Test single
# assert client.json().debug("MEMORY", "doc1", "$.nested2.a") == [24]
#
# # Test legacy
# assert client.json().debug("MEMORY", "doc1", "..a") == 72
#
# # Test missing path (defaults to root)
# assert client.json().debug("MEMORY", "doc1") == 72
#
# # Test missing key
# assert client.json().debug("MEMORY", "non_existing_doc", "$..a") == []


@pytest.mark.redismod
Expand Down