Skip to content

Commit 2848d1a

Browse files
author
Jeff Ammons
committed
Adding unit test to verify this fix is working
1 parent a5bef7a commit 2848d1a

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

tests/test_channel.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
from slackclient._channel import Channel
22
import pytest
33

4+
def mock_channel():
5+
''' Returns a Channel object for testing. '''
46

5-
def test_Channel(channel):
7+
def test_channel(channel):
68
assert type(channel) == Channel
79

10+
def test_channel_eq(channel):
11+
channel = Channel(
12+
'test-server',
13+
'test-channel',
14+
'C12345678',
15+
)
16+
assert channel == 'test-channel'
17+
assert channel == '#test-channel'
18+
assert channel == 'C12345678'
19+
assert (channel == 'foo') is False
820

921
@pytest.mark.xfail
10-
def test_Channel_send_message(channel):
22+
def test_channel_send_message(channel):
1123
channel.send_message('hi')

0 commit comments

Comments
 (0)