Passed
Push — master ( 00d837...bc5250 )
by Jace
49s
created

TestLinkService   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 6
1
# pylint: disable=no-self-use
2
3
import pytest
4
5
6
class TestLinkService:
7
8
    def test_decode_encoded_parts(self, link_service):
9
        code = link_service.encode("key", "my/path")
10
11
        parts = link_service.decode(code)
12
13
        assert ("key", "my/path") == parts
14
15
    def test_decode_invalid_code(self, link_service):
16
        with pytest.raises(ValueError):
17
            link_service.decode("bad_code")
18
19
    def test_decode_empty_code(self, link_service):
20
        with pytest.raises(ValueError):
21
            link_service.decode(b"")
22