tests.unit.test_core.test_constants   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 19
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Functions

Rating   Name   Duplication   Size   Complexity  
A test_flood() 0 3 1
A test_connection_timeout() 0 6 1
1
"""Test constants.py"""
2
3 1
from kytos.core import constants
4 1
from kytos.core.config import KytosConfig
5
6
7 1
def test_connection_timeout() -> None:
8
    """test connection_timeout."""
9 1
    assert constants.CONNECTION_TIMEOUT == 130
10 1
    assert (
11
        int(KytosConfig().options["daemon"].connection_timeout)
12
        == constants.CONNECTION_TIMEOUT
13
    )
14
15
16 1
def test_flood() -> None:
17
    """test flood."""
18
    assert constants.FLOOD_TIMEOUT == 100000
19