File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,8 @@ def bool_ok(response):
245
245
def parse_client_list (response , ** options ):
246
246
clients = []
247
247
for c in nativestr (response ).splitlines ():
248
- clients .append (dict ([pair .split ('=' ) for pair in c .split (' ' )]))
248
+ # Values might contain '='
249
+ clients .append (dict ([pair .split ('=' , 1 ) for pair in c .split (' ' )]))
249
250
return clients
250
251
251
252
Original file line number Diff line number Diff line change @@ -68,6 +68,14 @@ def test_client_setname(self, r):
68
68
assert r .client_setname ('redis_py_test' )
69
69
assert r .client_getname () == 'redis_py_test'
70
70
71
+ @skip_if_server_version_lt ('2.6.9' )
72
+ def test_client_list_after_client_setname (self , r ):
73
+ r .client_setname ('cl=i=ent' )
74
+ clients = r .client_list ()
75
+ assert isinstance (clients [0 ], dict )
76
+ assert 'name' in clients [0 ]
77
+ assert clients [0 ]['name' ] == 'cl=i=ent'
78
+
71
79
def test_config_get (self , r ):
72
80
data = r .config_get ()
73
81
assert 'maxmemory' in data
You can’t perform that action at this time.
0 commit comments