aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Shivansh <[email protected]>2021-05-10 10:02:22 +0530
committerGravatar Shivansh-007 <[email protected]>2021-10-11 12:05:41 +0530
commit24c7a975cf18b80ae4bb6d65f5a4950bae0ca4cb (patch)
tree57fd1af38ff29e1cc43f9de5185743264a613547
parent(incidents): Add test for text shortner (diff)
(incidents): Use subtests for test_shorten_text
-rw-r--r--tests/bot/exts/moderation/test_incidents.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/bot/exts/moderation/test_incidents.py b/tests/bot/exts/moderation/test_incidents.py
index 3c5d8f47d..875b76057 100644
--- a/tests/bot/exts/moderation/test_incidents.py
+++ b/tests/bot/exts/moderation/test_incidents.py
@@ -800,10 +800,10 @@ class TestMessageLinkEmbeds(TestIncidents):
'Hello, World!' * 300: ('Hello, World!' * 300)[:300] + '...'
}
- for test, value in tests.items():
- self.assertEqual(
- str(incidents.shorten_text(test)), value
- )
+ for content, expected_conversion in tests.items():
+ with self.subTest(content=content, expected_conversion=expected_conversion):
+ conversion = incidents.shorten_text(content)
+ self.assertEqual(conversion, expected_conversion)
async def extract_and_form_message_link_embeds(self):
"""