Skip to content

Commit

Permalink
fixed auth test
Browse files Browse the repository at this point in the history
  • Loading branch information
barshaul committed Sep 4, 2022
1 parent 71d7df2 commit dbb16f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import redis
from redis import exceptions
from redis.client import parse_info
from redis.credentials import StaticCredentialProvider

from .conftest import (
_get_client,
Expand Down Expand Up @@ -95,7 +96,9 @@ def teardown():
# error when switching to the db 9 because we're not authenticated yet
# setting the password on the connection itself triggers the
# authentication in the connection's `on_connect` method
r.connection.password = temp_pass
r.connection.credential_provider = StaticCredentialProvider(
password=temp_pass
)
except AttributeError:
# connection field is not set in Redis Cluster, but that's ok
# because the problem discussed above does not apply to Redis Cluster
Expand Down

0 comments on commit dbb16f4

Please sign in to comment.