Пример #1
0
 def test_init_all_accounts_error(self, mock_accessor):
     """Test initializing orchestrator accounts error."""
     mock_accessor.side_effect = AccountsAccessorError("Sample timeout error")
     try:
         Orchestrator()
     except Exception:
         self.fail("unexpected error")
Пример #2
0
 def test_get_account_exception(self, mock_accessor):
     """Test that no account is returned upon exception."""
     mock_accessor.side_effect = AccountsAccessorError(
         "Sample timeout error")
     ocp_account = msg_handler.get_account(self.ocp_test_provider_uuid,
                                           "test_request_id")
     self.assertIsNone(ocp_account)