From 75e683845a39279c377ca83cbfcb5f615cab9ff4 Mon Sep 17 00:00:00 2001 From: Shiz Date: Sat, 15 Mar 2014 15:50:04 +0100 Subject: [PATCH] tests: Add user destruction tests on leaving channel. --- tests/test_client_channels.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_client_channels.py b/tests/test_client_channels.py index 224d135..04c590c 100644 --- a/tests/test_client_channels.py +++ b/tests/test_client_channels.py @@ -19,3 +19,13 @@ def test_channel_destruction(server, client): client._create_channel('#pydle') client._destroy_channel('#pydle') 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