コード例 #1
0
 def test_urljoin(self):
     eq_(ftpscraper.urljoin('http://google.com', '/page.html'),
         'http://google.com/page.html')
     eq_(ftpscraper.urljoin('http://google.com/', '/page.html'),
         'http://google.com/page.html')
     eq_(ftpscraper.urljoin('http://google.com/', 'page.html'),
         'http://google.com/page.html')
     eq_(ftpscraper.urljoin('http://google.com', 'page.html'),
         'http://google.com/page.html')
     eq_(ftpscraper.urljoin('http://google.com', 'dir1', ''),
         'http://google.com/dir1/')
コード例 #2
0
 def test_urljoin(self):
     self.assertEqual(ftpscraper.urljoin('http://google.com', '/page.html'),
                      'http://google.com/page.html')
     self.assertEqual(
         ftpscraper.urljoin('http://google.com/', '/page.html'),
         'http://google.com/page.html')
     self.assertEqual(ftpscraper.urljoin('http://google.com/', 'page.html'),
                      'http://google.com/page.html')
     self.assertEqual(ftpscraper.urljoin('http://google.com', 'page.html'),
                      'http://google.com/page.html')
     self.assertEqual(ftpscraper.urljoin('http://google.com', 'dir1', ''),
                      'http://google.com/dir1/')
コード例 #3
0
ファイル: test_ftpscraper.py プロジェクト: vdt/socorro
 def test_urljoin(self):
     self.assertEqual(
         ftpscraper.urljoin('http://google.com', '/page.html'),
         'http://google.com/page.html'
     )
     self.assertEqual(
         ftpscraper.urljoin('http://google.com/', '/page.html'),
         'http://google.com/page.html'
     )
     self.assertEqual(
         ftpscraper.urljoin('http://google.com/', 'page.html'),
         'http://google.com/page.html'
     )
     self.assertEqual(
         ftpscraper.urljoin('http://google.com', 'page.html'),
         'http://google.com/page.html'
     )
     self.assertEqual(
         ftpscraper.urljoin('http://google.com', 'dir1', ''),
         'http://google.com/dir1/'
     )
コード例 #4
0
 def test_urljoin(self):
     eq_(
         ftpscraper.urljoin('http://google.com', '/page.html'),
         'http://google.com/page.html'
     )
     eq_(
         ftpscraper.urljoin('http://google.com/', '/page.html'),
         'http://google.com/page.html'
     )
     eq_(
         ftpscraper.urljoin('http://google.com/', 'page.html'),
         'http://google.com/page.html'
     )
     eq_(
         ftpscraper.urljoin('http://google.com', 'page.html'),
         'http://google.com/page.html'
     )
     eq_(
         ftpscraper.urljoin('http://google.com', 'dir1', ''),
         'http://google.com/dir1/'
     )
コード例 #5
0
 def test_urljoin(self):
     self.assertEqual(ftpscraper.urljoin("http://google.com", "/page.html"), "http://google.com/page.html")
     self.assertEqual(ftpscraper.urljoin("http://google.com/", "/page.html"), "http://google.com/page.html")
     self.assertEqual(ftpscraper.urljoin("http://google.com/", "page.html"), "http://google.com/page.html")
     self.assertEqual(ftpscraper.urljoin("http://google.com", "page.html"), "http://google.com/page.html")
     self.assertEqual(ftpscraper.urljoin("http://google.com", "dir1", ""), "http://google.com/dir1/")