def test_find_all_urls(self):
     self.assertEqual(
         SanitationUtils.find_all_urls("http://www.technotan.com.au/"),
         [u'http://www.technotan.com.au/'])
     self.assertEqual(
         SanitationUtils.find_all_urls("http://www.technotan.com.au/?p=1"),
         [u'http://www.technotan.com.au/?p=1'])
     self.assertEqual(SanitationUtils.find_all_urls("www.technotan.com.au"),
                      [])
Example #2
0
 def test_find_url_hard(self):
     url = 'http://www.facebook.com/search/?flt=1&q=amber+melrose&o=2048&s=0#'
     self.assertItemsEqual(SanitationUtils.find_all_urls(url), [
         'http://www.facebook.com/search/?flt=1&q=amber+melrose&o=2048&s=0#'
     ])
Example #3
0
 def test_find_url(self):
     url1 = "http://www.laserphile.com/ lol"
     self.assertItemsEqual(SanitationUtils.find_all_urls(url1),
                           ['http://www.laserphile.com/'])