Browse Source

Add tests for Channels

pull/27/head
Andrei 8 years ago
parent
commit
6e8719b128
  1. 21
      tests/test_channel.py

21
tests/test_channel.py

@ -0,0 +1,21 @@
from unittest import TestCase
from disco.types.channel import Channel, ChannelType
class TestChannel(TestCase):
def test_nsfw_channel(self):
channel = Channel(
name='nsfw-testing',
type=ChannelType.GUILD_TEXT)
self.assertTrue(channel.is_nsfw)
channel = Channel(
name='nsfw-testing',
type=ChannelType.GUILD_VOICE)
self.assertFalse(channel.is_nsfw)
channel = Channel(
name='nsfw_testing',
type=ChannelType.GUILD_TEXT)
self.assertFalse(channel.is_nsfw)
Loading…
Cancel
Save