29
29
def test_simple(self):
31
git_url_to_bzr_url('foo:bar/path'),
32
'git+ssh://foo/bar/path')
31
git_url_to_bzr_url('foo:bar/path'),
32
'git+ssh://foo/bar/path')
36
('git+ssh://user@foo/bar/path'))
36
('git+ssh://user@foo/bar/path'))
38
38
def test_regular(self):
41
'git+ssh://user@foo/bar/path'),
42
('git+ssh://user@foo/bar/path'))
41
'git+ssh://user@foo/bar/path'),
42
('git+ssh://user@foo/bar/path'))
44
44
def test_path(self):
45
self.assertEqual(git_url_to_bzr_url('/bar/path'), ('/bar/path'))
47
def test_with_ref(self):
49
git_url_to_bzr_url('foo:bar/path', ref=b'HEAD'),
50
'git+ssh://foo/bar/path')
52
git_url_to_bzr_url('foo:bar/path', ref=b'refs/heads/blah'),
53
'git+ssh://foo/bar/path,branch=blah')
55
git_url_to_bzr_url('foo:bar/path', ref=b'refs/tags/blah'),
56
'git+ssh://foo/bar/path,ref=refs%2Ftags%2Fblah')
58
def test_with_branch(self):
60
git_url_to_bzr_url('foo:bar/path', branch=''),
61
'git+ssh://foo/bar/path')
63
git_url_to_bzr_url('foo:bar/path', branch='foo/blah'),
64
'git+ssh://foo/bar/path,branch=foo%2Fblah')
66
git_url_to_bzr_url('foo:bar/path', branch='blah'),
67
'git+ssh://foo/bar/path,branch=blah')