summaryrefslogtreecommitdiff
path: root/tests/test_commands.py
diff options
context:
space:
mode:
authorBo Bayles <bbayles@gmail.com>2018-11-20 21:47:49 -0600
committerBo Bayles <bbayles@gmail.com>2018-11-20 21:47:49 -0600
commit1df87fc82348a26cd638bd82b431bf902522a8c4 (patch)
tree93e32447a555e742ef594ae79e7ecfbd4505b278 /tests/test_commands.py
parentc8936f7c713e333c21dd7a6d5ecfa582bcafb535 (diff)
downloadredis-py-1df87fc82348a26cd638bd82b431bf902522a8c4.tar.gz
Don't destroy data in GEORADIUS commands
Diffstat (limited to 'tests/test_commands.py')
-rw-r--r--tests/test_commands.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/test_commands.py b/tests/test_commands.py
index 28b8813..4e72466 100644
--- a/tests/test_commands.py
+++ b/tests/test_commands.py
@@ -1653,10 +1653,11 @@ class TestRedisCommands(object):
@skip_if_server_version_lt('3.2.0')
def test_georadius(self, r):
values = (2.1909389952632, 41.433791470673, 'place1') +\
- (2.1873744593677, 41.406342043777, 'place2')
+ (2.1873744593677, 41.406342043777, b'\x80place2')
r.geoadd('barcelona', *values)
assert r.georadius('barcelona', 2.191, 41.433, 1000) == ['place1']
+ assert r.georadius('barcelona', 2.187, 41.406, 1000) == [b'\x80place2']
@skip_if_server_version_lt('3.2.0')
def test_georadius_no_values(self, r):
@@ -1746,17 +1747,17 @@ class TestRedisCommands(object):
@skip_if_server_version_lt('3.2.0')
def test_georadiusmember(self, r):
values = (2.1909389952632, 41.433791470673, 'place1') +\
- (2.1873744593677, 41.406342043777, 'place2')
+ (2.1873744593677, 41.406342043777, b'\x80place2')
r.geoadd('barcelona', *values)
assert r.georadiusbymember('barcelona', 'place1', 4000) ==\
- ['place2', 'place1']
+ [b'\x80place2', 'place1']
assert r.georadiusbymember('barcelona', 'place1', 10) == ['place1']
assert r.georadiusbymember('barcelona', 'place1', 4000,
withdist=True, withcoord=True,
withhash=True) ==\
- [['place2', 3067.4157, 3471609625421029,
+ [[b'\x80place2', 3067.4157, 3471609625421029,
(2.187376320362091, 41.40634178640635)],
['place1', 0.0, 3471609698139488,
(2.1909382939338684, 41.433790281840835)]]