Test Failed
Push — master ( ad184d...ba033d )
by Milan
01:39 queued 15s
created

test_cce   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 2

2 Functions

Rating   Name   Duplication   Size   Complexity  
A test_is_cce_value_valid() 0 7 1
A test_is_cce_format_valid() 0 10 1
1
import ssg.cce as tested_module
2
3
4
def test_is_cce_format_valid():
5
    icv = tested_module.is_cce_format_valid
6
    assert icv("CCE-27191-6")
7
    assert icv("CCE-7223-7")
8
9
    assert not icv("not-valid")
10
    assert not icv("1234-5")
11
    assert not icv("TBD")
12
    assert not icv("CCE-TBD")
13
    assert not icv("CCE-abcde-f")
14
15
16
def test_is_cce_value_valid():
17
    icv = tested_module.is_cce_value_valid
18
    assert icv("CCE-27191-6")
19
    assert icv("CCE-27223-7")
20
21
    assert not icv("1234-5")
22
    assert not icv("12345-6")
23