devtools/testlib.py
branchstable
changeset 8480 086cff6a306a
parent 8463 a964c40adbe3
child 8497 7f71e366cb5e
equal deleted inserted replaced
8479:19cc6eb51783 8480:086cff6a306a
   474         There are two ways to call this method, which may be used together :
   474         There are two ways to call this method, which may be used together :
   475 
   475 
   476         * using positional argument(s):
   476         * using positional argument(s):
   477 
   477 
   478           .. sourcecode:: python
   478           .. sourcecode:: python
       
   479 
   479                 rdef = self.schema['CWUser'].rdef('login')
   480                 rdef = self.schema['CWUser'].rdef('login')
   480                 with self.temporary_permissions((rdef, {'read': ()})):
   481                 with self.temporary_permissions((rdef, {'read': ()})):
   481                     ...
   482                     ...
   482 
   483 
   483 
   484 
   484         * using named argument(s):
   485         * using named argument(s):
   485 
   486 
   486           .. sourcecode:: python
   487           .. sourcecode:: python
       
   488 
   487                 rdef = self.schema['CWUser'].rdef('login')
   489                 rdef = self.schema['CWUser'].rdef('login')
   488                 with self.temporary_permissions(CWUser={'read': ()}):
   490                 with self.temporary_permissions(CWUser={'read': ()}):
   489                     ...
   491                     ...
   490 
   492 
   491         Usually the former will be prefered to override permissions on a
   493         Usually the former will be prefered to override permissions on a