@@ -88,15 +88,15 @@ def test_connects_to_same_address_if_same_id_replica(
88
88
connection_pool_replica_mock : SentinelConnectionPool ,
89
89
) -> None :
90
90
"""
91
- Assert that the connection address is the same if the ``_iter_req_id `` is the same
91
+ Assert that the connection address is the same if the ``iter_req_id `` is the same
92
92
when we are in replica mode using a
93
93
:py:class:`~redis.sentinel.SentinelConnectionPool`.
94
94
"""
95
95
connection_for_req_1 = connection_pool_replica_mock .get_connection (
96
- "ANY" , _iter_req_id = 1
96
+ "ANY" , iter_req_id = 1
97
97
)
98
98
assert same_address (
99
- connection_pool_replica_mock .get_connection ("ANY" , _iter_req_id = 1 ),
99
+ connection_pool_replica_mock .get_connection ("ANY" , iter_req_id = 1 ),
100
100
connection_for_req_1 ,
101
101
)
102
102
@@ -105,18 +105,18 @@ def test_connects_to_same_conn_object_if_same_id_and_conn_released_replica(
105
105
connection_pool_replica_mock : SentinelConnectionPool ,
106
106
) -> None :
107
107
"""
108
- Assert that the connection object is the same if the ``_iter_req_id `` is the same
108
+ Assert that the connection object is the same if the ``iter_req_id `` is the same
109
109
when we are in replica mode using a
110
110
:py:class:`~redis.sentinel.SentinelConnectionPool`
111
111
and if we release the connection back to the connection pool before
112
112
trying to connect again.
113
113
"""
114
114
connection_for_req_1 = connection_pool_replica_mock .get_connection (
115
- "ANY" , _iter_req_id = 1
115
+ "ANY" , iter_req_id = 1
116
116
)
117
117
connection_pool_replica_mock .release (connection_for_req_1 )
118
118
assert (
119
- connection_pool_replica_mock .get_connection ("ANY" , _iter_req_id = 1 )
119
+ connection_pool_replica_mock .get_connection ("ANY" , iter_req_id = 1 )
120
120
== connection_for_req_1
121
121
)
122
122
@@ -125,12 +125,12 @@ def test_connects_to_diff_address_if_no_iter_req_id_replica(
125
125
connection_pool_replica_mock : SentinelConnectionPool ,
126
126
) -> None :
127
127
"""
128
- Assert that the connection object is different if no _iter_req_id is supplied.
128
+ Assert that the connection object is different if no iter_req_id is supplied.
129
129
In reality, they can be the same, but in this case, we're not
130
130
releasing the connection to the pool so they should always be different.
131
131
"""
132
132
connection_for_req_1 = connection_pool_replica_mock .get_connection (
133
- "ANY" , _iter_req_id = 1
133
+ "ANY" , iter_req_id = 1
134
134
)
135
135
connection_for_random_req = connection_pool_replica_mock .get_connection ("ANYY" )
136
136
assert not same_address (connection_for_random_req , connection_for_req_1 )
@@ -156,7 +156,7 @@ def test_connects_to_same_address_if_same_iter_req_id_master(
156
156
"ANY" , _iter_req_id = 1
157
157
)
158
158
assert same_address (
159
- connection_pool_master_mock .get_connection ("ANY" , _iter_req_id = 1 ),
159
+ connection_pool_master_mock .get_connection ("ANY" , iter_req_id = 1 ),
160
160
connection_for_req_1 ,
161
161
)
162
162
@@ -172,10 +172,10 @@ def test_connects_to_same_conn_object_if_same_iter_req_id_and_released_master(
172
172
trying to connect again.
173
173
"""
174
174
connection_for_req_1 = connection_pool_master_mock .get_connection (
175
- "ANY" , _iter_req_id = 1
175
+ "ANY" , iter_req_id = 1
176
176
)
177
177
assert same_address (
178
- connection_pool_master_mock .get_connection ("ANY" , _iter_req_id = 1 ),
178
+ connection_pool_master_mock .get_connection ("ANY" , iter_req_id = 1 ),
179
179
connection_for_req_1 ,
180
180
)
181
181
@@ -190,7 +190,7 @@ def test_connects_to_same_address_if_no_iter_req_id_master(
190
190
:py:class:`~redis.sentinel.SentinelConnectionPool`.
191
191
"""
192
192
connection_for_req_1 = connection_pool_master_mock .get_connection (
193
- "ANY" , _iter_req_id = 1
193
+ "ANY" , iter_req_id = 1
194
194
)
195
195
connection_for_random_req = connection_pool_master_mock .get_connection ("ANYY" )
196
196
assert same_address (connection_for_random_req , connection_for_req_1 )
0 commit comments