File tree Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -121,14 +121,14 @@ def test_client_get_many(get_cluster_info):
121121 ret = backend .get_many (['key2' ])
122122 eq_ (ret , {})
123123
124- with patch ('django_elastipymemcache.client.Client.get_many' ):
125- with patch ('pymemcache.client.hash.HashClient._safely_run_func' ) as p2 :
126- p2 .return_value = {
127- ':1:key3' : 1509111630.048594
128- }
124+ with patch ('django_elastipymemcache.client.Client.get_many' ), \
125+ patch ('pymemcache.client.hash.HashClient._safely_run_func' ) as p2 :
126+ p2 .return_value = {
127+ ':1:key3' : 1509111630.048594
128+ }
129129
130- ret = backend .get_many (['key3' ])
131- eq_ (ret , {'key3' : 1509111630.048594 })
130+ ret = backend .get_many (['key3' ])
131+ eq_ (ret , {'key3' : 1509111630.048594 })
132132
133133 # If False value is included, ignore it.
134134 with patch ('pymemcache.client.hash.HashClient.get_many' ) as p :
@@ -145,3 +145,17 @@ def test_client_get_many(get_cluster_info):
145145 'key3' : 1509111630.058594
146146 },
147147 )
148+
149+ with patch ('pymemcache.client.hash.HashClient.get_many' ) as p :
150+ p .return_value = {
151+ ':1:key1' : None ,
152+ ':1:key2' : 1509111630.048594 ,
153+ ':1:key3' : False ,
154+ }
155+ ret = backend .get_many (['key1' , 'key2' , 'key3' ])
156+ eq_ (
157+ ret ,
158+ {
159+ 'key2' : 1509111630.048594 ,
160+ },
161+ )
You can’t perform that action at this time.
0 commit comments