Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
shohamazon committed Apr 10, 2024
1 parent 5e63dba commit 9f8495a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions python/python/tests/test_async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,23 @@ async def test_geoadd(self, redis_client: TRedisClient):
with pytest.raises(RequestError):
await redis_client.geoadd(key2, members_coordinates)

@pytest.mark.parametrize("cluster_mode", [True, False])
@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3])
async def test_geoadd_invalid_coordinates(self, redis_client: TRedisClient):
key = get_random_string(10)

with pytest.raises(RequestError):
await redis_client.geoadd(key, {"Place": Coordinate(-181, 0)})

with pytest.raises(RequestError):
await redis_client.geoadd(key, {"Place": Coordinate(181, 0)})

with pytest.raises(RequestError):
await redis_client.geoadd(key, {"Place": Coordinate(0, 86)})

with pytest.raises(RequestError):
await redis_client.geoadd(key, {"Place": Coordinate(0, -86)})

@pytest.mark.parametrize("cluster_mode", [True, False])
@pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3])
async def test_zadd_zaddincr(self, redis_client: TRedisClient):
Expand Down

0 comments on commit 9f8495a

Please sign in to comment.