tests.test_irc_channel.test_irc_channel_creation()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 11
rs 9.95
c 0
b 0
f 0
cc 1
nop 3
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