Skip to content
This repository has been archived by the owner on Apr 20, 2020. It is now read-only.

Commit

Permalink
ref #80 add test
Browse files Browse the repository at this point in the history
  • Loading branch information
gkorland committed Feb 16, 2020
1 parent bd62719 commit 967d402
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/pytest/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,19 @@ def testDoubleParse(self):
self.assertEqual(1512060373.222988, float(res))
self.assertEqual('1512060373.222988', res)

def testIssue_80(self):
"""https://github.com/RedisJSON/RedisJSON2/issues/80"""

with self.redis() as r:
r.client_setname(self._testMethodName)
r.flushdb()

self.assertOk(r.execute_command('JSON.SET', 'test', '.', '[{"code":"1"}, {"code":"2"}]'))
r.execute_command('JSON.GET', 'test', '.[?(@.code=="2")]')

# This shouldn't crash Redis
r.execute_command('JSON.GET', 'test', '$.[?(@.code=="2")]')

#
# class CacheTestCase(BaseReJSONTest):
# @property
Expand Down

0 comments on commit 967d402

Please sign in to comment.