mirror of https://github.com/Shizmob/pydle.git
tests: Add user destruction tests on leaving channel.
This commit is contained in:
parent
0c2c0ab381
commit
75e683845a
|
@ -19,3 +19,13 @@ def test_channel_destruction(server, client):
|
||||||
client._create_channel('#pydle')
|
client._create_channel('#pydle')
|
||||||
client._destroy_channel('#pydle')
|
client._destroy_channel('#pydle')
|
||||||
assert '#pydle' not in client.channels
|
assert '#pydle' not in client.channels
|
||||||
|
|
||||||
|
@with_client()
|
||||||
|
def test_channel_user_destruction(server, client):
|
||||||
|
client._create_channel('#pydle')
|
||||||
|
client._create_user('WiZ')
|
||||||
|
client.channels['#pydle']['users'].add('WiZ')
|
||||||
|
|
||||||
|
client._destroy_channel('#pydle')
|
||||||
|
assert '#pydle' not in client.channels
|
||||||
|
assert 'WiZ' not in client.users
|
||||||
|
|
Loading…
Reference in New Issue