Esempio n. 1
0
  def test_ListTemplatesWithNoSuchKeyError(self):
    """Test _ListTemplates with NoSuchKeyError."""
    stage = self.ConstructStage()
    stage.ctx = mock.Mock()
    stage.ctx.LS.side_effect = gs.GSNoSuchKey()

    gs_paths = stage._ListTemplates()
    self.assertEqual(gs_paths, [])
Esempio n. 2
0
 def _RaiseGSNoSuchKey(*_args, **_kwargs):
     raise gs.GSNoSuchKey('file does not exist')