mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-04 08:56:19 +00:00
Fix EmbedMediaProxy boolean check
This commit is contained in:
@ -267,3 +267,14 @@ def test_embed_colour_setter_failure(value):
|
||||
embed = discord.Embed()
|
||||
with pytest.raises(TypeError):
|
||||
embed.colour = value
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
('title', 'return_val'),
|
||||
[
|
||||
('test', True),
|
||||
(None, False)
|
||||
]
|
||||
)
|
||||
def test_embed_truthiness(title: str, return_val: bool) -> None:
|
||||
embed = discord.Embed(title=title)
|
||||
assert bool(embed) is return_val
|
||||
|
Reference in New Issue
Block a user