Ejemplo n.º 1
0
 def test_ssh_explicit(self):
     c, path = get_transport_and_path_from_url('git+ssh://foo.com/bar/baz')
     self.assertTrue(isinstance(c, SSHGitClient))
     self.assertEqual('foo.com', c.host)
     self.assertEqual(None, c.port)
     self.assertEqual(None, c.username)
     self.assertEqual('/bar/baz', path)
Ejemplo n.º 2
0
 def test_ssh_port_homepath(self):
     c, path = get_transport_and_path_from_url(
         'git+ssh://foo.com:1234/~/bar/baz')
     self.assertTrue(isinstance(c, SSHGitClient))
     self.assertEqual('foo.com', c.host)
     self.assertEqual(1234, c.port)
     self.assertEqual('/~/bar/baz', path)
Ejemplo n.º 3
0
 def test_file(self):
     c, path = get_transport_and_path_from_url('file:///home/jelmer/foo')
     self.assertTrue(isinstance(c, LocalGitClient))
     self.assertEqual('/home/jelmer/foo', path)
Ejemplo n.º 4
0
 def test_http(self):
     url = 'https://github.com/jelmer/dulwich'
     c, path = get_transport_and_path_from_url(url)
     self.assertTrue(isinstance(c, HttpGitClient))
     self.assertEqual('/jelmer/dulwich', path)
Ejemplo n.º 5
0
 def test_tcp_port(self):
     c, path = get_transport_and_path_from_url('git://foo.com:1234/bar/baz')
     self.assertTrue(isinstance(c, TCPGitClient))
     self.assertEqual('foo.com', c._host)
     self.assertEqual(1234, c._port)
     self.assertEqual('/bar/baz', path)