File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ def __repr__(self):
6767 for key , value in sorted (
6868 client .connection_pool .connection_kwargs .items ()
6969 )
70- if key in {"host" , "db" }
70+ if key in {"host" , "port" , " db" }
7171 )
7272 return f"Redis({ safe_connection_str } )"
7373 except AttributeError :
Original file line number Diff line number Diff line change @@ -151,12 +151,13 @@ async def test_redis__validation_neither_param(self):
151151
152152 def test_redis__repr_standard_client (self ):
153153 """Verify repr includes host and db for a standard Redis client."""
154+ # https://github.com/codingjoe/django-health-check/issues/659
154155 from redis .asyncio import Redis as RedisClient
155156
156157 check = RedisHealthCheck (
157158 client_factory = lambda : RedisClient (host = "myhost" , port = 6379 , db = 2 )
158159 )
159- assert repr (check ) == "Redis(db=2, host='myhost')"
160+ assert repr (check ) == "Redis(db=2, host='myhost', port=6379 )"
160161
161162 def test_redis__repr_from_url (self ):
162163 """Verify repr includes host and db when client is created via from_url."""
You can’t perform that action at this time.
0 commit comments