Exemple #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, [])
Exemple #2
0
 def _RaiseGSNoSuchKey(*_args, **_kwargs):
     raise gs.GSNoSuchKey('file does not exist')