예제 #1
0
 def test_wrap(self, bb):
     obj = Mock()
     with patch('mode.utils.logging.Logwrapped') as Logwrapped:
         ret = bb.wrap(logging.ERROR, obj)
         assert ret is Logwrapped.return_value
         Logwrapped.assert_called_once_with(
             logger=bb,
             severity=logging.ERROR,
             obj=obj,
         )
예제 #2
0
 def wrapped(self, *, obj, logger):
     return Logwrapped(obj, logger, severity='INFO', ident='ident')
예제 #3
0
 def wrapped(self, *, obj, logger):
     return Logwrapped(obj, logger, severity="INFO", ident="ident")