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