async def test_channels_set_unverified_only(self, guild: Guild): channel = ChannelFactory.create(guild=guild, unverified_only=False) channels = ChannelsService() await channels.set_unverified_only(channel.xid, True) data = await channels.select(channel.xid) assert data["unverified_only"]
async def test_channels_set_auto_verify(self, guild: Guild): channel = ChannelFactory.create(guild=guild, auto_verify=False) channels = ChannelsService() await channels.set_auto_verify(channel.xid, True) data = await channels.select(channel.xid) assert data["auto_verify"]
async def test_channels_set_motd(self, guild: Guild): channels = ChannelsService() channel = ChannelFactory.create(guild=guild, motd="whatever") data = await channels.select(channel.xid) assert data["motd"] == "whatever" await channels.set_motd(channel.xid, "something else") data = await channels.select(channel.xid) assert data["motd"] == "something else"
async def test_channels_verified_only(self, guild: Guild): channel = ChannelFactory.create(guild=guild, verified_only=True) channels = ChannelsService() data = await channels.select(channel.xid) assert data["verified_only"]
async def test_channels_select(self, guild: Guild): channels = ChannelsService() assert not await channels.select(404) ChannelFactory.create(guild=guild, xid=404) assert await channels.select(404)