Ejemplo n.º 1
0
    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"]
Ejemplo n.º 2
0
    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"]
Ejemplo n.º 3
0
    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"
Ejemplo n.º 4
0
    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"]
Ejemplo n.º 5
0
    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)