def testWhitespace(self): urlparser = URLParser() self.assertEqual(urlparser.is_git_ssh_url(' [email protected]:Jarn/jarn.mkrelease'), False)
def testEmptyString(self): urlparser = URLParser() self.assertEqual(urlparser.is_git_ssh_url(''), False)
def testColonOnly(self): urlparser = URLParser() self.assertEqual(urlparser.is_git_ssh_url(':'), False)
def testBadUrl(self): urlparser = URLParser() self.assertEqual(urlparser.is_git_ssh_url('ssh'), False)
def testFalsePositives(self): # Everything with a colon matches the regex... urlparser = URLParser() self.assertEqual(urlparser.is_git_ssh_url('foo:'), True)
def testSlashBeforeColon(self): urlparser = URLParser() self.assertEqual(urlparser.is_git_ssh_url('/foo:'), False)
def testUnknown(self): urlparser = URLParser() self.assertEqual(urlparser.is_git_ssh_url('foo://'), False)
def testUnsupported(self): urlparser = URLParser() self.assertEqual(urlparser.is_git_ssh_url('ftp://'), False)
def testGit(self): urlparser = URLParser() self.assertEqual(urlparser.is_git_ssh_url('git://'), False)
def testSsh(self): urlparser = URLParser() self.assertEqual(urlparser.is_git_ssh_url('ssh://'), False)
def testGitSsh(self): urlparser = URLParser() self.assertEqual(urlparser.is_git_ssh_url('[email protected]:Jarn/jarn.mkrelease'), True)