示例#1
0
 def test_normalize_url_good_url(self):
     url = 'http://example.com/atom'
     self.assertEqual(url, utils.normalize_url(url, 'http://example.com'))
示例#2
0
 def test_normalize_url_trailing_slash_base(self):
     url = 'feed.rss'
     base_url = 'http://example.com/'
     self.assertEqual('http://example.com/feed.rss',
                      utils.normalize_url(url, base_url))
示例#3
0
 def test_normalize_url_no_slashes(self):
     url = 'feed.rss'
     base_url = 'http://example.com'
     self.assertEqual('http://example.com/feed.rss',
                      utils.normalize_url(url, base_url))
示例#4
0
 def test_normalize_url_two_slashes(self):
     url = '/feed.rss'
     base_url = 'http://example.com/'
     self.assertEqual('http://example.com/feed.rss',
                      utils.normalize_url(url, base_url))
示例#5
0
 def test_normalize_url_good_url(self):
     url = 'http://example.com/atom'
     self.assertEqual(url, utils.normalize_url(url, 'http://example.com'))
示例#6
0
 def test_normalize_url_trailing_slash_base(self):
     url = 'feed.rss'
     base_url = 'http://example.com/'
     self.assertEqual('http://example.com/feed.rss',
                      utils.normalize_url(url, base_url))
示例#7
0
 def test_normalize_url_no_slashes(self):
     url = "feed.rss"
     base_url = "http://example.com"
     self.assertEqual("http://example.com/feed.rss", utils.normalize_url(url, base_url))
示例#8
0
 def test_normalize_url_trailing_slash_base(self):
     url = "feed.rss"
     base_url = "http://example.com/"
     self.assertEqual("http://example.com/feed.rss", utils.normalize_url(url, base_url))