aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar ks123 <[email protected]>2020-03-12 20:00:24 +0200
committerGravatar ks123 <[email protected]>2020-03-12 20:00:24 +0200
commitcd1193ec09c5259ff2f2c5906faf20ed788326c9 (patch)
tree19b755168683f0939480d443b8578b0fbdc6ced4 /tests
parent(Moderation Utils Tests): Added params to variable in `has_active_infraction`... (diff)
(Moderation Utils Tests): Moved embed generating to test cases loop from test cases listing, added icon to test cases in `notify_pardon` test
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/cogs/moderation/test_utils.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/bot/cogs/moderation/test_utils.py b/tests/bot/cogs/moderation/test_utils.py
index 3432ff595..7f5e441b7 100644
--- a/tests/bot/cogs/moderation/test_utils.py
+++ b/tests/bot/cogs/moderation/test_utils.py
@@ -177,27 +177,27 @@ class ModerationUtilsTests(unittest.IsolatedAsyncioTestCase):
test_cases = [
{
"args": (self.user, "Test title", "Example content"),
- "expected_output": Embed(
- description="Example content",
- colour=PARDON_COLOR
- ).set_author(name="Test title", icon_url=Icons.user_verified),
+ "icon": Icons.user_verified,
"send_result": True
},
{
- "args": (self.user, "Test title 1", "Example content 1", Icons.user_update),
- "expected_output": Embed(
- description="Example content 1",
- colour=PARDON_COLOR
- ).set_author(name="Test title 1", icon_url=Icons.user_update),
+ "args": (self.user, "Test title", "Example content", Icons.user_update),
+ "icon": Icons.user_update,
"send_result": False
}
]
for case in test_cases:
args = case["args"]
- expected = case["expected_output"]
send = case["send_result"]
+ expected = Embed(
+ description="Example content",
+ colour=PARDON_COLOR).set_author(
+ name="Test title",
+ icon_url=case["icon"]
+ )
+
with self.subTest(args=args, expected=expected):
send_private_embed_mock.reset_mock()