Passed
Pull Request — rhel7-branch (#72)
by Matěj
55s
created

test_data_fetch   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 7
dl 0
loc 11
rs 10
c 0
b 0
f 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A test_supported_url() 0 3 3
A test_unsupported_url() 0 2 2
1
from org_fedora_oscap import data_fetch
2
3
4
def test_supported_url():
5
    assert data_fetch.can_fetch_from("http://example.com")
6
    assert data_fetch.can_fetch_from("https://example.com")
7
8
9
def test_unsupported_url():
10
    assert not data_fetch.can_fetch_from("aaaaa")
11