Total Complexity | 1 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """ |
||
2 | :Copyright: 2007-2021 Jochen Kupperschmidt |
||
3 | :License: MIT, see LICENSE for details. |
||
4 | """ |
||
5 | |||
6 | import pytest |
||
7 | |||
8 | from syslog2irc.irc import IrcChannel |
||
9 | |||
10 | |||
11 | @pytest.mark.parametrize( |
||
12 | 'channel, expected_name, expected_password', |
||
13 | [ |
||
14 | (IrcChannel('#example'), '#example', None ), |
||
15 | (IrcChannel('#example', password=None), '#example', None ), |
||
16 | (IrcChannel('#headquarters', password='secret'), '#headquarters', 'secret'), |
||
17 | ], |
||
18 | ) |
||
19 | def test_irc_channel_creation(channel, expected_name, expected_password): |
||
20 | assert channel.name == expected_name |
||
21 | assert channel.password == expected_password |
||
22 |