def test_no_task(self): class Record(object): msg = "hello world" levelname = "info" exc_text = exc_info = None def getMessage(self): return self.msg record = Record() x = TaskFormatter() x.format(record) self.assertEqual(record.task_name, "???") self.assertEqual(record.task_id, "???")
def test_no_task(self): class Record(object): msg = 'hello world' levelname = 'info' exc_text = exc_info = None stack_info = None def getMessage(self): return self.msg record = Record() x = TaskFormatter() x.format(record) self.assertEqual(record.task_name, '???') self.assertEqual(record.task_id, '???')
def test_no_task(self): class Record: msg = 'hello world' levelname = 'info' exc_text = exc_info = None stack_info = None def getMessage(self): return self.msg record = Record() x = TaskFormatter() x.format(record) assert record.task_name == '???' assert record.task_id == '???'