diff options
| author | Benjamin Peterson <benjamin@python.org> | 2011-07-08 18:39:56 (GMT) |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2011-07-08 18:39:56 (GMT) |
| commit | 910789f10fb314fe7149be84aa57d6ec12ad4a7b (patch) | |
| tree | a658027493df6d758e5d0b802ffa72e66594ad1e /Lib/test/test_urllibnet.py | |
| parent | ae10c0653e5469e7f41f12cee35bfe653a389cbc (diff) | |
| parent | 4a183b47f353a25b76aaaf1b7043458dbcab8890 (diff) | |
| download | cpython-910789f10fb314fe7149be84aa57d6ec12ad4a7b.zip cpython-910789f10fb314fe7149be84aa57d6ec12ad4a7b.tar.gz cpython-910789f10fb314fe7149be84aa57d6ec12ad4a7b.tar.bz2 | |
merge heads
Diffstat (limited to 'Lib/test/test_urllibnet.py')
| -rw-r--r-- | Lib/test/test_urllibnet.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py index 03d1708..383b2af 100644 --- a/Lib/test/test_urllibnet.py +++ b/Lib/test/test_urllibnet.py @@ -113,6 +113,14 @@ class urlopenNetworkTests(unittest.TestCase): def test_bad_address(self): # Make sure proper exception is raised when connecting to a bogus # address. + bogus_domain = "sadflkjsasf.i.nvali.d" + try: + socket.gethostbyname(bogus_domain) + except socket.gaierror: + pass + else: + # This happens with some overzealous DNS providers such as OpenDNS + self.skipTest("%r should not resolve for test to work" % bogus_domain) self.assertRaises(IOError, # SF patch 809915: In Sep 2003, VeriSign started # highjacking invalid .com and .net addresses to |
