-
Notifications
You must be signed in to change notification settings - Fork 71
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
Python: add JSON.TYPE command #2409
Conversation
Signed-off-by: Muhammad Awawdi <[email protected]>
Signed-off-by: Muhammad Awawdi <[email protected]>
Signed-off-by: Muhammad Awawdi <[email protected]>
Signed-off-by: Muhammad Awawdi <[email protected]>
result = await json.type(glide_client, key, "$.key6") | ||
assert result == [b"bool"] | ||
|
||
# Check for non-existent path $.key7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a similar test for legacy path which will return None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a test for legacy + multiple path match
127.0.0.1:6379> json.set k1 . '{"a": 1, "nested": {"a": 2, "b": 3}}'
OK
127.0.0.1:6379> json.type k1 ..a
integer
|
||
# Check for invalid path format | ||
result = await json.type(glide_client, key, "$.key1.key2") # Invalid path | ||
assert result == [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a test for non existing key with 2 types of path
Co-authored-by: Shoham Elias <[email protected]> Signed-off-by: Muhammad-awawdi-amazon <[email protected]>
Signed-off-by: Muhammad Awawdi <[email protected]>
Signed-off-by: Muhammad Awawdi <[email protected]>
Co-authored-by: Shoham Elias <[email protected]> Signed-off-by: Muhammad-awawdi-amazon <[email protected]>
Signed-off-by: Muhammad Awawdi <[email protected]>
--------- Signed-off-by: Muhammad Awawdi <[email protected]> Signed-off-by: Muhammad-awawdi-amazon <[email protected]> Co-authored-by: Shoham Elias <[email protected]>
No description provided.