File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 10
10
import redis
11
11
from redis import exceptions
12
12
from redis .client import parse_info
13
+ from redis .credentials import StaticCredentialProvider
13
14
14
15
from .conftest import (
15
16
_get_client ,
@@ -95,7 +96,9 @@ def teardown():
95
96
# error when switching to the db 9 because we're not authenticated yet
96
97
# setting the password on the connection itself triggers the
97
98
# authentication in the connection's `on_connect` method
98
- r .connection .password = temp_pass
99
+ r .connection .credential_provider = StaticCredentialProvider (
100
+ password = temp_pass
101
+ )
99
102
except AttributeError :
100
103
# connection field is not set in Redis Cluster, but that's ok
101
104
# because the problem discussed above does not apply to Redis Cluster
You can’t perform that action at this time.
0 commit comments