コード例 #1
0
 def testSplitBadUrl(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('ssh:[email protected]/public'),
                      ('', '', '', 'ssh:[email protected]/public', '', ''))
コード例 #2
0
 def testSplitGitWithTilde(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('git://jarn.com/~stefan/public'),
                      ('git', '', 'jarn.com', '/~stefan/public', '', ''))
コード例 #3
0
 def testSplitUnsupported(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('ftp://jarn.com/public'),
                      ('ftp', '', 'jarn.com', '/public', '', ''))
コード例 #4
0
 def testSplitRelativeFileWithTilde(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('file:~stefan/public'),
                      ('file', '', '', '~stefan/public', '', ''))
コード例 #5
0
 def testSplitLocalhostWithTilde(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('file://localhost/~stefan/public'),
                      ('file', '', 'localhost', '/~stefan/public', '', ''))
コード例 #6
0
 def testSplitFile(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('file:///var/dist/public'),
                      ('file', '', '', '/var/dist/public', '', ''))
コード例 #7
0
 def testSplitRelativeFile(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('file:var/dist/public'),
                      ('file', '', '', 'var/dist/public', '', ''))
コード例 #8
0
 def testSplitHttps(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('https://*****:*****@jarn.com/public'),
                      ('https', 'stefan:secret', 'jarn.com', '/public', '', ''))
コード例 #9
0
 def testSplitHttp(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('http://jarn.com/public'),
                      ('http', '', 'jarn.com', '/public', '', ''))
コード例 #10
0
 def testSplitSsh(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('ssh://[email protected]//hg/public'),
                      ('ssh', 'stefan', 'jarn.com', '//hg/public', '', ''))
コード例 #11
0
 def testSplitRsync(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('rsync://jarn.com/public'),
                      ('rsync', '', 'jarn.com', '/public', '', ''))
コード例 #12
0
 def testSplitSvn(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.split('svn://jarn.com/public'),
                      ('svn', '', 'jarn.com', '/public', '', ''))