|
|
|
@ -89,6 +89,14 @@ class TestTouchManifest(unittest.TestCase):
|
|
|
|
|
self.assertEqual(1, len(manifest._manifest))
|
|
|
|
|
self.assertIn('foo', manifest)
|
|
|
|
|
|
|
|
|
|
def test_fetch_excpetion(self):
|
|
|
|
|
_p = mock.patch('urllib.urlopen')
|
|
|
|
|
mocked_urlopen = _p.start()
|
|
|
|
|
self.addCleanup(_p.stop)
|
|
|
|
|
mocked_urlopen.side_effect = [IOError("connection refused")]
|
|
|
|
|
manifest = boottest.TouchManifest('not-real', 'not-real')
|
|
|
|
|
self.assertEqual(0, len(manifest._manifest))
|
|
|
|
|
|
|
|
|
|
def test_simple(self):
|
|
|
|
|
# Existing manifest file allows callsites to properly check presence.
|
|
|
|
|
manifest_dir = os.path.join(self.imagesdir, 'ubuntu/vivid')
|
|
|
|
|