Beispiel #1
0
 def testSsh(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('ssh://'), False)
Beispiel #2
0
 def testSsh(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('ssh://'), False)
Beispiel #3
0
 def testBadUrl(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('ssh'), False)
Beispiel #4
0
 def testUserOnly(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('stefan@:/var/dist/public'), True)
Beispiel #5
0
 def testSlashBeforeColon(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('/foo:'), False)
Beispiel #6
0
 def testNonAlphanumeric(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('$&%:'), True)
Beispiel #7
0
 def testColonOnly(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url(':'), False)
Beispiel #8
0
 def testUnknown(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('foo://'), False)
Beispiel #9
0
 def testFalsePositives(self):
     # Everything with a colon matches the regex...
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('foo:'), True)
Beispiel #10
0
 def testSlashBeforeColon(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('/foo:'), False)
Beispiel #11
0
 def testUnknown(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('foo://'), False)
Beispiel #12
0
 def testUnsupported(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('ftp://'), False)
Beispiel #13
0
 def testGit(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('git://'), False)
Beispiel #14
0
 def testGit(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('git://'), False)
Beispiel #15
0
 def testNonAlphanumeric(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('$&%:'), True)
Beispiel #16
0
 def testUnsupported(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('ftp://'), False)
Beispiel #17
0
 def testNonConsecutive(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('f o:'), False)
Beispiel #18
0
 def testFalsePositives(self):
     # Everything with a colon matches the regex...
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('foo:'), True)
Beispiel #19
0
 def testBadUrl(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('ssh'), False)
Beispiel #20
0
 def testColonOnly(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url(':'), False)
Beispiel #21
0
 def testWhitespace(self):
     urlparser = URLParser()
     self.assertEqual(
         urlparser.is_ssh_url(' [email protected]:Jarn/jarn.mkrelease'), False)
Beispiel #22
0
 def testNonConsecutive(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('f o:'), False)
Beispiel #23
0
 def testEmptyString(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url(''), False)
Beispiel #24
0
 def testWhitespace(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url(' [email protected]:Jarn/jarn.mkrelease'), False)
Beispiel #25
0
 def testGitSsh(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url('[email protected]:Jarn/jarn.mkrelease'), True)
Beispiel #26
0
 def testEmptyString(self):
     urlparser = URLParser()
     self.assertEqual(urlparser.is_ssh_url(''), False)
Beispiel #27
0
 def testGitSsh(self):
     urlparser = URLParser()
     self.assertEqual(
         urlparser.is_ssh_url('[email protected]:Jarn/jarn.mkrelease'), True)