| Total Complexity | 1 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | """ |
||
| 2 | :Copyright: 2007-2025 Jochen Kupperschmidt |
||
| 3 | :License: MIT, see LICENSE for details. |
||
| 4 | """ |
||
| 5 | |||
| 6 | import pytest |
||
| 7 | |||
| 8 | from weitersager.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('#whq', password='secret'), '#whq', '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 |