예제 #1
0
 def testSplitUnsupported(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('ftp://jarn.com/public'),
                      ('ftp', '', 'jarn.com', '/public', '', ''))
예제 #2
0
 def testSplitLocalhostWithTilde(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('file://localhost/~stefan/public'),
                      ('file', '', 'localhost', '/~stefan/public', '', ''))
예제 #3
0
 def testSplitLocalhostWithTilde(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('file://localhost/~stefan/public'),
                      ('file', '', 'localhost', '/~stefan/public', '', ''))
예제 #4
0
 def testSplitHttp(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('http://jarn.com/public'),
                      ('http', '', 'jarn.com', '/public', '', ''))
예제 #5
0
 def testSplitFile(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('file:///var/dist/public'),
                      ('file', '', '', '/var/dist/public', '', ''))
예제 #6
0
 def testSplitSvn(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('svn://jarn.com/public'),
                      ('svn', '', 'jarn.com', '/public', '', ''))
예제 #7
0
 def testSplitRsync(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('rsync://jarn.com/public'),
                      ('rsync', '', 'jarn.com', '/public', '', ''))
예제 #8
0
 def testSplitRsync(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('rsync://jarn.com/public'),
                      ('rsync', '', 'jarn.com', '/public', '', ''))
예제 #9
0
 def testSplitSsh(self):
     urlparser = URLParser()
     self.assertEqual(
         urlparser.urlsplit('ssh://[email protected]//hg/public'),
         ('ssh', 'stefan', 'jarn.com', '//hg/public', '', ''))
예제 #10
0
 def testSplitSvn(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('svn://jarn.com/public'),
                      ('svn', '', 'jarn.com', '/public', '', ''))
예제 #11
0
 def testSplitGit(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('git://jarn.com/public'),
                      ('git', '', 'jarn.com', '/public', '', ''))
예제 #12
0
 def testSplitSftp(self):
     urlparser = URLParser()
     self.assertEqual(
         urlparser.urlsplit('sftp://[email protected]/var/dist/public'),
         ('sftp', 'stefan', 'jarn.com', '/var/dist/public', '', ''))
예제 #13
0
 def testSplitBadUrl(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('ssh:[email protected]/public'),
                      ('', '', '', 'ssh:[email protected]/public', '', ''))
예제 #14
0
 def testSplitUnsupported(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('ftp://jarn.com/public'),
                      ('ftp', '', 'jarn.com', '/public', '', ''))
예제 #15
0
 def testSplitBadUrl(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('ssh:[email protected]/public'),
                      ('', '', '', 'ssh:[email protected]/public', '', ''))
예제 #16
0
 def testSplitHttp(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('http://jarn.com/public'),
                      ('http', '', 'jarn.com', '/public', '', ''))
예제 #17
0
 def testSplitSftp(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('sftp://[email protected]/var/dist/public'),
                      ('sftp', 'stefan', 'jarn.com', '/var/dist/public', '', ''))
예제 #18
0
 def testSplitHttps(self):
     urlparser = URLParser()
     self.assertEqual(
         urlparser.urlsplit('https://*****:*****@jarn.com/public'),
         ('https', 'stefan:secret', 'jarn.com', '/public', '', ''))
예제 #19
0
 def testSplitGit(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('git://jarn.com/public'),
                      ('git', '', 'jarn.com', '/public', '', ''))
예제 #20
0
 def testSplitFile(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('file:///var/dist/public'),
                      ('file', '', '', '/var/dist/public', '', ''))
예제 #21
0
 def testSplitSsh(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('ssh://[email protected]//hg/public'),
                      ('ssh', 'stefan', 'jarn.com', '//hg/public', '', ''))
예제 #22
0
 def testSplitRelativeFile(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('file:var/dist/public'),
                      ('file', '', '', 'var/dist/public', '', ''))
예제 #23
0
 def testSplitHttps(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('https://*****:*****@jarn.com/public'),
                      ('https', 'stefan:secret', 'jarn.com', '/public', '', ''))
예제 #24
0
 def testSplitRelativeFileWithTilde(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('file:~stefan/public'),
                      ('file', '', '', '~stefan/public', '', ''))
예제 #25
0
 def testSplitRelativeFile(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('file:var/dist/public'),
                      ('file', '', '', 'var/dist/public', '', ''))
예제 #26
0
 def testSplitRelativeFileWithTilde(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.urlsplit('file:~stefan/public'),
                      ('file', '', '', '~stefan/public', '', ''))