def test_embed_consistent_with_url(announce_cog): guild: discord.Guild = dpytest.get_config().guilds[0] announce_cog.messages[guild.id] = Announce.AnnounceMessage( f"This announcement is from {guild.name}", "testMessage", "test_url") embed: discord.Embed = announce_cog.construct_embed(guild) assert embed.title == f"This announcement is from {guild.name}" assert embed.description == "testMessage" assert embed.thumbnail.url == "test_url"
def make_message(guild, announce_cog): announce_cog.messages[guild.id] = Announce.AnnounceMessage( f"This announcement is from {guild.name}", "testMessage", guild.icon_url) announce_cog.roles[guild.id] = []
def announce_cog(bot: discord.ext.commands.Bot): announce_cog = Announce.Announce(bot) bot.add_cog(announce_cog) dpytest.configure(bot) print("Tests starting") return announce_cog