601
602
author=b'author <author@example.com>')
602
603
remote = ControlDir.open(self.remote_url)
603
604
self.assertEqual('master', remote.open_branch().nick)
607
class GitUrlAndPathFromTransportTests(TestCase):
610
split_url = _git_url_and_path_from_transport('file:///home/blah')
611
self.assertEqual(split_url.scheme, 'file')
612
self.assertEqual(split_url.path, '/home/blah')
614
def test_file_segment_params(self):
615
split_url = _git_url_and_path_from_transport('file:///home/blah,branch=master')
616
self.assertEqual(split_url.scheme, 'file')
617
self.assertEqual(split_url.path, '/home/blah')
619
def test_git_smart(self):
620
split_url = _git_url_and_path_from_transport(
621
'git://github.com/dulwich/dulwich,branch=master')
622
self.assertEqual(split_url.scheme, 'git')
623
self.assertEqual(split_url.path, '/dulwich/dulwich')
625
def test_https(self):
626
split_url = _git_url_and_path_from_transport(
627
'https://github.com/dulwich/dulwich')
628
self.assertEqual(split_url.scheme, 'https')
629
self.assertEqual(split_url.path, '/dulwich/dulwich')
631
def test_https_segment_params(self):
632
split_url = _git_url_and_path_from_transport(
633
'https://github.com/dulwich/dulwich,branch=master')
634
self.assertEqual(split_url.scheme, 'https')
635
self.assertEqual(split_url.path, '/dulwich/dulwich')