diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-03-21 10:28:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-07 11:16:53 +0000 |
commit | 06cba6ccd165ca8b224797e37fccb9e63f026d77 (patch) | |
tree | e82f1bc439997ae296f2e74f8a64d84c5d95f140 /tests/unittests/command_parse/test_geo.py | |
parent | Initial commit. (diff) | |
download | iredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.tar.xz iredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.zip |
Adding upstream version 1.9.1.upstream/1.9.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/unittests/command_parse/test_geo.py')
-rw-r--r-- | tests/unittests/command_parse/test_geo.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/unittests/command_parse/test_geo.py b/tests/unittests/command_parse/test_geo.py new file mode 100644 index 0000000..8a8d4c7 --- /dev/null +++ b/tests/unittests/command_parse/test_geo.py @@ -0,0 +1,39 @@ +def test_geoadd(judge_command): + judge_command( + 'GEOADD Sicily 13.361389 38.115556 "Palermo" 15.087269 37.502669 "Catania"', + { + "command": "GEOADD", + "key": "Sicily", + "longitude": "15.087269", + "latitude": "37.502669", + "member": '"Catania"', + }, + ) + + +def test_georadiusbymember(judge_command): + judge_command( + "GEORADIUSBYMEMBER Sicily Agrigento 100 km", + { + "command": "GEORADIUSBYMEMBER", + "key": "Sicily", + "member": "Agrigento", + "float": "100", + "distunit": "km", + }, + ) + + +def test_georadius(judge_command): + judge_command( + "GEORADIUS Sicily 15 37 200 km WITHDIST WITHCOORD ", + { + "command": "GEORADIUS", + "key": "Sicily", + "longitude": "15", + "latitude": "37", + "float": "200", + "distunit": "km", + "geochoice": "WITHCOORD", + }, + ) |