Beispiel #1
0
 def test_convenience_log_debug(self):
     """Test the log_debug convenience function."""
     
     event = log_debug("label", "message", self.user, extra=self.extra)
     self.assertTrue(event.id)
     self.assertEqual(event.label, "label")
     self.assertEqual(event.message, "message")
     self.assertEqual(event.user, self.user)
     self.assertEqual(event.extra, self.extra)
     self.assertEqual(event.level, logging.DEBUG)
Beispiel #2
0
 def test_log_log_debug(self):
     """Test that log_debug convenience function logs if enabled."""
     
     with LogCapture() as l:
         event = log_debug("label", "message", self.user, extra=self.extra)
         l.check() # debug logging is disabled, HAHA!