def test_sum_stats(self): expected = { 'Bounces': 2, 'Complaints': 4, 'DeliveryAttempts': 66, 'Rejects': 6, } stats = stats_to_list(self.stats_dict) actual = sum_stats(stats) self.assertEqual(actual, expected)