mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-06-12 10:11:34 +00:00
Don't bother creating another mocked urllib.urlopen.
This commit is contained in:
parent
f0a55936f5
commit
6269f50abc
@ -90,10 +90,7 @@ class TestTouchManifest(unittest.TestCase):
|
|||||||
self.assertIn('foo', manifest)
|
self.assertIn('foo', manifest)
|
||||||
|
|
||||||
def test_fetch_exception(self):
|
def test_fetch_exception(self):
|
||||||
_p = mock.patch('urllib.urlopen')
|
self.mocked_urlopen.side_effect = [IOError("connection refused")]
|
||||||
mocked_urlopen = _p.start()
|
|
||||||
self.addCleanup(_p.stop)
|
|
||||||
mocked_urlopen.side_effect = [IOError("connection refused")]
|
|
||||||
manifest = boottest.TouchManifest('not-real', 'not-real')
|
manifest = boottest.TouchManifest('not-real', 'not-real')
|
||||||
self.assertEqual(0, len(manifest._manifest))
|
self.assertEqual(0, len(manifest._manifest))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user