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

Commit dbdd412

Browse files
committed
ref #74 add test for usecase
1 parent 12e1577 commit dbdd412

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/pytest/test.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,18 @@ def testIssue_13(self):
733733
# This shouldn't crash Redis
734734
r.execute_command('JSON.GET', 'test', 'foo', 'foo')
735735

736+
def testIssue_74(self):
737+
"""https://github.com/RedisJSON/RedisJSON2/issues/74"""
738+
739+
with self.redis() as r:
740+
r.client_setname(self._testMethodName)
741+
r.flushdb()
742+
743+
self.assertOk(r.execute_command('JSON.SET', 'test', '.', '{}'))
744+
# This shouldn't crash Redis
745+
with self.assertRaises(redis.exceptions.ResponseError) as cm:
746+
r.execute_command('JSON.SET', 'test', '$a', '12')
747+
736748
def testRediSearch(self):
737749
"""Test RediSearch integration"""
738750
# To run:

0 commit comments

Comments
 (0)