示例#1
0
 def testWhitespace(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_git_ssh_url(' [email protected]:Jarn/jarn.mkrelease'), False)
示例#2
0
 def testEmptyString(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_git_ssh_url(''), False)
示例#3
0
 def testColonOnly(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_git_ssh_url(':'), False)
示例#4
0
 def testBadUrl(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_git_ssh_url('ssh'), False)
示例#5
0
 def testFalsePositives(self):
     # Everything with a colon matches the regex...
     urlparser = URLParser()
     self.assertEqual(urlparser.is_git_ssh_url('foo:'), True)
示例#6
0
 def testSlashBeforeColon(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_git_ssh_url('/foo:'), False)
示例#7
0
 def testUnknown(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_git_ssh_url('foo://'), False)
示例#8
0
 def testUnsupported(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_git_ssh_url('ftp://'), False)
示例#9
0
 def testGit(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_git_ssh_url('git://'), False)
示例#10
0
 def testSsh(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_git_ssh_url('ssh://'), False)
示例#11
0
 def testGitSsh(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_git_ssh_url('[email protected]:Jarn/jarn.mkrelease'), True)