Пример #1
0
 def test_long_hash(self):
     result = paper_links.main(bitly=True, long_hash=True)[0]
     m = re.search('bit.ly/(.{12})$', result)
     self.assertEqual(len(m.group(1)), 12)
Пример #2
0
 def test_bitly(self):
     result = paper_links.main(bitly=True)
     self.assertEqual(result[0][:15], "https://bit.ly/")
Пример #3
0
 def test_soogd_length(self):
     result = paper_links.main(soogd=True)
     self.assertEqual(len(result[0]), 19)
Пример #4
0
 def test_all_urls_length(self):
     result = paper_links.main(all_urls=True)
     self.assertEqual(len(result), 5)
Пример #5
0
 def test_isgd_length(self):
     result = paper_links.main(isgd=True)
     self.assertEqual(len(result[0]), 20)
Пример #6
0
 def test_soogd(self):
     result = paper_links.main(soogd=True)
     self.assertEqual(result[0][:15], "https://soo.gd/")
Пример #7
0
 def test_isgd(self):
     result = paper_links.main(isgd=True)
     self.assertEqual(result[0][:14], "https://is.gd/")
Пример #8
0
 def test_tinyurl_length(self):
     result = paper_links.main(tinyurl=True)
     self.assertEqual(len(result[0]), 28)
Пример #9
0
 def test_tinyurl(self):
     result = paper_links.main(tinyurl=True)
     self.assertEqual(result[0][:20], "https://tinyurl.com/")
Пример #10
0
 def test_tinycc(self):
     result = paper_links.main(tinycc=True)
     self.assertEqual(result[0][:16], "https://tiny.cc/")
Пример #11
0
 def test_bitly_length(self):
     result = paper_links.main(bitly=True)
     self.assertEqual(len(result[0]), 22)