def test_check_url__with_network__not_reachable(self): about_file = AboutFile() if check_network_connection(): self.assertFalse(about_file.check_url('http://www.google', True))
def test_check_url__with_network__not_starting_with_www(self): about_file = AboutFile() self.assertTrue(about_file.check_url('https://nexb.com', True)) self.assertTrue(about_file.check_url('http://archive.apache.org/dist/httpcomponents/commons-httpclient/2.0/source/commons-httpclient-2.0-alpha2-src.tar.gz', True)) if check_network_connection(): self.assertFalse(about_file.check_url('http://nothing_here.com', True))