summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_json.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/tests/test_json.py b/tests/test_json.py
index 676683d..a776e9e 100644
--- a/tests/test_json.py
+++ b/tests/test_json.py
@@ -1326,17 +1326,10 @@ def test_arrindex_dollar(client):
[],
]
- # Fail with none-scalar value
- with pytest.raises(exceptions.ResponseError):
- client.json().arrindex("test_None", "$..nested42_empty_arr.arr", {"arr": []})
-
- # Do not fail with none-scalar value in legacy mode
- assert (
- client.json().arrindex(
- "test_None", ".[4][1].nested42_empty_arr.arr", '{"arr":[]}'
- )
- == -1
- )
+ # Test with none-scalar value
+ assert client.json().arrindex(
+ "test_None", "$..nested42_empty_arr.arr", {"arr": []}
+ ) == [-1]
# Test legacy (path begins with dot)
# Test index of int scalar in single value