Anton Shestakov <av6@dwimlabs.net>, Sun, 19 Jun 2016 22:03:36 +0800
incoming: use dicts instead of tuples for Check.lines
tests/test_incoming.py
Permissions: -rw-r--r--
from incoming import parse_project_url def test_parse_project_url(): result = parse_project_url('https://example.com/alice/hello-world') assert result == ('example.com', 'alice', 'hello-world') result = parse_project_url('~alice/hello-world') assert result == ('self', '~alice', 'hello-world') result = parse_project_url('https://code.example.com/hello-world') assert result == ('code.example.com', None, 'hello-world') result = parse_project_url('https://example.com/scm/projects/hello-world') assert result == ('example.com', 'scm', 'projects/hello-world') result = parse_project_url('https://example.com///hello-world//') assert result == ('example.com', None, 'hello-world')