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