@@ -88,6 +88,7 @@ def redis_keys(pattern):
8888 except Exception as e :
8989 return jsonify ({"error" : str (e )}), 500
9090
91+
9192@app .route ("/test/mget-mset" , methods = ["GET" ])
9293def test_mget_mset ():
9394 """Test MGET/MSET - multiple key operations."""
@@ -102,6 +103,7 @@ def test_mget_mset():
102103 except Exception as e :
103104 return jsonify ({"error" : str (e )}), 500
104105
106+
105107@app .route ("/test/pipeline-basic" , methods = ["GET" ])
106108def test_pipeline_basic ():
107109 """Test basic pipeline operations."""
@@ -134,6 +136,7 @@ def test_pipeline_no_transaction():
134136 except Exception as e :
135137 return jsonify ({"error" : str (e )}), 500
136138
139+
137140@app .route ("/test/async-pipeline" , methods = ["GET" ])
138141def test_async_pipeline ():
139142 """Test async pipeline operations using asyncio."""
@@ -146,7 +149,7 @@ async def run_async_pipeline():
146149 host = os .getenv ("REDIS_HOST" , "redis" ),
147150 port = int (os .getenv ("REDIS_PORT" , "6379" )),
148151 db = 0 ,
149- decode_responses = True
152+ decode_responses = True ,
150153 )
151154
152155 try :
@@ -167,13 +170,11 @@ async def run_async_pipeline():
167170
168171 try :
169172 results = asyncio .run (run_async_pipeline ())
170- return jsonify ({
171- "success" : True ,
172- "results" : results
173- })
173+ return jsonify ({"success" : True , "results" : results })
174174 except Exception as e :
175175 return jsonify ({"error" : str (e )}), 500
176176
177+
177178@app .route ("/test/binary-data" , methods = ["GET" ])
178179def test_binary_data ():
179180 """Test binary data that cannot be decoded as UTF-8."""
@@ -183,7 +184,7 @@ def test_binary_data():
183184 host = os .getenv ("REDIS_HOST" , "redis" ),
184185 port = int (os .getenv ("REDIS_PORT" , "6379" )),
185186 db = 0 ,
186- decode_responses = False
187+ decode_responses = False ,
187188 )
188189
189190 # Binary data that cannot be decoded as UTF-8
@@ -198,15 +199,18 @@ def test_binary_data():
198199 # Clean up
199200 binary_client .delete ("test:binary:key" )
200201
201- return jsonify ({
202- "success" : True ,
203- "original_hex" : binary_value .hex (),
204- "retrieved_hex" : retrieved .hex () if retrieved else None ,
205- "match" : binary_value == retrieved
206- })
202+ return jsonify (
203+ {
204+ "success" : True ,
205+ "original_hex" : binary_value .hex (),
206+ "retrieved_hex" : retrieved .hex () if retrieved else None ,
207+ "match" : binary_value == retrieved ,
208+ }
209+ )
207210 except Exception as e :
208211 return jsonify ({"error" : str (e )}), 500
209212
213+
210214@app .route ("/test/transaction-watch" , methods = ["GET" ])
211215def test_transaction_watch ():
212216 """Test transaction with WATCH pattern.
@@ -235,12 +239,7 @@ def test_transaction_watch():
235239 # Clean up
236240 redis_client .delete ("test:watch:counter" )
237241
238- return jsonify ({
239- "success" : True ,
240- "initial_value" : 10 ,
241- "expected_final" : 15 ,
242- "results" : results
243- })
242+ return jsonify ({"success" : True , "initial_value" : 10 , "expected_final" : 15 , "results" : results })
244243 except Exception as e :
245244 return jsonify ({"error" : str (e )}), 500
246245
0 commit comments