| Total Complexity | 6 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | # pylint: disable=no-self-use |
||
| 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 |