def test_get_summary(self): logger = Logger() logger.get_warnings = MagicMock(return_value=['the warnings']) logger.get_errors = MagicMock(return_value=['the errors']) logger.get_log_counts = MagicMock(return_value={'the': 'log counts'}) self.assertEqual({ 'warnings': ['the warnings'], 'errors': ['the errors'], 'log_counts': {'the': 'log counts'} }, logger.get_summary())
def test_get_log_counts(self): logger = Logger() logger._data_msg_count = MagicMock() self.assertEqual(logger._data_msg_count, logger.get_log_counts())