diff options
| author | 2020-09-21 19:59:15 +0800 | |
|---|---|---|
| committer | 2020-09-21 19:59:15 +0800 | |
| commit | 78cac100cfc634b6d4c3c45c06da3dec944e9cbb (patch) | |
| tree | a5d5b3ef1a410649ad51da135dd173d16b5246ca /tests | |
| parent | Move member status information to embed field. (diff) | |
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.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bot/exts/info/test_information.py | 7 | 
1 files changed, 3 insertions, 4 deletions
| 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(),          ) | 
