2025-02-09 16:57:44 +01:00
|
|
|
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"',
|
|
|
|
},
|
|
|
|
)
|
2025-02-09 17:08:57 +01:00
|
|
|
judge_command(
|
|
|
|
'GEOADD Sicily NX CH 13.361389 38.115556 "Palermo" 15.087269 37.502669 "Catania"',
|
|
|
|
{
|
|
|
|
"command": "GEOADD",
|
|
|
|
"condition": "NX",
|
|
|
|
"changed": "CH",
|
|
|
|
"key": "Sicily",
|
|
|
|
"longitude": "15.087269",
|
|
|
|
"latitude": "37.502669",
|
|
|
|
"member": '"Catania"',
|
|
|
|
},
|
|
|
|
)
|
2025-02-09 16:57:44 +01:00
|
|
|
|
|
|
|
|
2025-02-09 17:08:57 +01:00
|
|
|
def test_geosearch(judge_command):
|
2025-02-09 16:57:44 +01:00
|
|
|
judge_command(
|
2025-02-09 17:08:57 +01:00
|
|
|
"GEOSEARCH Sicily FROMLONLAT 15 37 BYBOX 400 400 km ASC WITHCOORD WITHDIST",
|
2025-02-09 16:57:44 +01:00
|
|
|
{
|
2025-02-09 17:08:57 +01:00
|
|
|
"command": "GEOSEARCH",
|
2025-02-09 16:57:44 +01:00
|
|
|
"key": "Sicily",
|
2025-02-09 17:08:57 +01:00
|
|
|
"any": "FROMLONLAT 15 37 BYBOX 400 400 km ASC WITHCOORD WITHDIST",
|
2025-02-09 16:57:44 +01:00
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2025-02-09 17:08:57 +01:00
|
|
|
def test_geosearchstore(judge_command):
|
2025-02-09 16:57:44 +01:00
|
|
|
judge_command(
|
2025-02-09 17:08:57 +01:00
|
|
|
"GEOSEARCHSTORE key2 Sicily FROMLONLAT 15 37 BYBOX 400 400 km ASC COUNT 3 STOREDIST",
|
2025-02-09 16:57:44 +01:00
|
|
|
{
|
2025-02-09 17:08:57 +01:00
|
|
|
"command": "GEOSEARCHSTORE",
|
|
|
|
"key": ["Sicily", "key2"],
|
|
|
|
"any": "FROMLONLAT 15 37 BYBOX 400 400 km ASC COUNT 3 STOREDIST",
|
2025-02-09 16:57:44 +01:00
|
|
|
},
|
|
|
|
)
|