def test_is_valid_url_returns_true_for_valid_urls(self): valid_urls = [ "http://stackoverflow.com/questions/25259134/how-can-i-check-whether-a-url-is-valid-using-urlparse", "http://en.wikipedia.org/wiki/Internationalized_resource_identifier" ] for url in valid_urls: self.assertTrue(mod.is_valid_url(url))
def test_is_valid_url_returns_false_for_invalid_urls(self): invalid_urls = [ "/something.path", "/path/to/somewhere" ] for url in invalid_urls: self.assertFalse(mod.is_valid_url(url))