Kaydet (Commit) 130a566a authored tarafından R David Murray's avatar R David Murray

Suppress a couple more DeprecationWarnings in the test suite.

üst dbb7aa5b
......@@ -91,7 +91,8 @@ class urlopenNetworkTests(unittest.TestCase):
# test getcode() with the fancy opener to get 404 error codes
URL = "http://www.example.com/XXXinvalidXXX"
with support.transient_internet(URL):
open_url = urllib.request.FancyURLopener().open(URL)
with self.assertWarns(DeprecationWarning):
open_url = urllib.request.FancyURLopener().open(URL)
try:
code = open_url.getcode()
finally:
......
......@@ -1211,7 +1211,7 @@ class MockTest(unittest.TestCase):
m = Mock()
m.hello(name='hello', daddy='hero')
text = "call(daddy='hero', name='hello')"
self.assertEquals(repr(m.hello.call_args), text)
self.assertEqual(repr(m.hello.call_args), text)
def test_mock_add_spec(self):
class _One(object):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment