Example #1
0
 def test_emit_empty(self):
     m = Mock()
     t = datetime.time()
     failure = Mock()
     failure.getTraceback.return_value = ""
     _emit(m, {"message": "", "time": t, "isError": "", "failure": failure})
     self.assertEqual(m.formatTime.call_count, 0)
Example #2
0
 def test_emit(self):
     m = Mock()
     t = datetime.time()
     _emit(m, {
         "message": "some message",
         "time": t
     })
     m.formatTime.assert_called_with(t)
Example #3
0
 def test_emit(self):
     m = Mock()
     t = datetime.time()
     _emit(m, {
         "message": "some message",
         "time": t
     })
     m.formatTime.assert_called_with(t)
Example #4
0
 def test_emit_empty(self):
     m = Mock()
     t = datetime.time()
     failure = Mock()
     failure.getTraceback.return_value = ""
     _emit(m, {
         "message": "",
         "time": t,
         "isError": "",
         "failure": failure
     })
     self.assertEqual(m.formatTime.call_count, 0)