tests.test_irc_channel   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 12
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_irc_channel_creation() 0 11 1
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