Don't bother creating another mocked urllib.urlopen.

This commit is contained in:
Joe Talbott 2015-02-05 17:27:39 -05:00
parent f0a55936f5
commit 6269f50abc

View File

@ -90,10 +90,7 @@ class TestTouchManifest(unittest.TestCase):
self.assertIn('foo', manifest)
def test_fetch_exception(self):
_p = mock.patch('urllib.urlopen')
mocked_urlopen = _p.start()
self.addCleanup(_p.stop)
mocked_urlopen.side_effect = [IOError("connection refused")]
self.mocked_urlopen.side_effect = [IOError("connection refused")]
manifest = boottest.TouchManifest('not-real', 'not-real')
self.assertEqual(0, len(manifest._manifest))