@@ -208,10 +208,11 @@ def test_no_perms(self):
208208 self .generic_test_authorized ('GET' , request , self .auth .read_list ,
209209 self .auth .read_detail )
210210
211- for method , function_list , function_detail in \
212- (('POST' , self .auth .create_list , self .auth .create_detail ),
213- ('PUT' , self .auth .update_list , self .auth .update_detail ),
214- ('DELETE' , self .auth .delete_list , self .auth .delete_detail )):
211+ methods = [('POST' , self .auth .create_list , self .auth .create_detail ),
212+ ('PUT' , self .auth .update_list , self .auth .update_detail ),
213+ ('DELETE' , self .auth .delete_list , self .auth .delete_detail )]
214+
215+ for method , function_list , function_detail in methods :
215216 self .generic_test_unauthorized (method , request , function_list ,
216217 function_detail )
217218
@@ -257,16 +258,17 @@ def test_all(self):
257258 request .user .user_permissions .add (self .change )
258259 request .user .user_permissions .add (self .delete )
259260
260- for method , function_list , function_detail in \
261- (('GET' , self .auth .read_list , self .auth .read_detail ),
261+ methods = [('GET' , self .auth .read_list , self .auth .read_detail ),
262262 ('OPTIONS' , self .auth .read_list , self .auth .read_detail ),
263263 ('HEAD' , self .auth .read_list , self .auth .read_detail ),
264264 ('POST' , self .auth .create_list , self .auth .create_detail ),
265265 ('PUT' , self .auth .update_list , self .auth .update_detail ),
266266 ('PATCH' , self .auth .read_list , self .auth .read_detail ),
267267 ('PATCH' , self .auth .update_list , self .auth .update_detail ),
268268 ('PATCH' , self .auth .delete_list , self .auth .delete_detail ),
269- ('DELETE' , self .auth .delete_list , self .auth .delete_detail )):
269+ ('DELETE' , self .auth .delete_list , self .auth .delete_detail )]
270+
271+ for method , function_list , function_detail in methods :
270272 self .generic_test_authorized (method , request , function_list ,
271273 function_detail )
272274
@@ -480,16 +482,17 @@ def test_all(self):
480482 request .user .user_permissions .add (self .change )
481483 request .user .user_permissions .add (self .delete )
482484
483- for method , function_list , function_detail in \
484- (('GET' , self .auth .read_list , self .auth .read_detail ),
485+ methods = [('GET' , self .auth .read_list , self .auth .read_detail ),
485486 ('OPTIONS' , self .auth .read_list , self .auth .read_detail ),
486487 ('HEAD' , self .auth .read_list , self .auth .read_detail ),
487488 ('POST' , self .auth .create_list , self .auth .create_detail ),
488489 ('PUT' , self .auth .update_list , self .auth .update_detail ),
489490 ('PATCH' , self .auth .read_list , self .auth .read_detail ),
490491 ('PATCH' , self .auth .update_list , self .auth .update_detail ),
491492 ('PATCH' , self .auth .delete_list , self .auth .delete_detail ),
492- ('DELETE' , self .auth .delete_list , self .auth .delete_detail )):
493+ ('DELETE' , self .auth .delete_list , self .auth .delete_detail )]
494+
495+ for method , function_list , function_detail in methods :
493496 self .generic_test_authorized (method , request , function_list ,
494497 function_detail )
495498
0 commit comments