47:5633f9a8dc95
Anton Shestakov <av6@dwimlabs.net>, Sun, 19 Jun 2016 22:03:36 +0800
incoming: use dicts instead of tuples for Check.lines

next change 50:8194291e98bc
previous change 45:d120981c4310

tests/test_incoming.py

Permissions: -rw-r--r--

Other formats: Feeds:
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')