From 78cac100cfc634b6d4c3c45c06da3dec944e9cbb Mon Sep 17 00:00:00 2001 From: kosayoda Date: Mon, 21 Sep 2020 19:59:15 +0800 Subject: Simplify channel counting. Rather than do two passes over the channels, a single loop is used to collect all the channel counts into a single dictionary. The get_channel_type_counts method now returns a dictionary of channel to count, allowing the caller liberty to format the values. --- tests/bot/exts/info/test_information.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/bot/exts/info/test_information.py b/tests/bot/exts/info/test_information.py index f09f815eb..1fd3ef066 100644 --- a/tests/bot/exts/info/test_information.py +++ b/tests/bot/exts/info/test_information.py @@ -162,10 +162,9 @@ class InformationCogTests(unittest.TestCase): self.assertEqual( channel_field.value, textwrap.dedent(""" - Category channels: 1 - Text channels: 1 - Voice channels: 1 - Staff channels: 0 + Category: 1 + Text: 1 + Voice: 1 """).strip(), ) -- cgit v1.2.3