コード例 #1
0
ファイル: test_clients.py プロジェクト: wxy8961230/heat
 def test_ignore_not_found(self):
     con = mock.Mock()
     c = clients.Clients(con)
     client_plugin = c.client_plugin(self.plugin)
     try:
         exp = self.exception()
         exp_class = exp.__class__
         raise exp
     except Exception as e:
         if self.is_not_found:
             client_plugin.ignore_not_found(e)
         else:
             self.assertRaises(exp_class, client_plugin.ignore_not_found, e)
コード例 #2
0
ファイル: test_clients.py プロジェクト: junxu/heat
 def test_ignore_not_found(self):
     con = mock.Mock()
     c = clients.Clients(con)
     client_plugin = c.client_plugin(self.plugin)
     try:
         exp = self.exception()
         exp_class = exp.__class__
         raise exp
     except Exception as e:
         if self.is_not_found:
             client_plugin.ignore_not_found(e)
         else:
             self.assertRaises(exp_class, client_plugin.ignore_not_found, e)