def setup(self):
     """Setup before each method"""
     self._dispatcher = PagerDutyIncidentOutput(REGION, ACCOUNT_ID, FUNCTION_NAME, CONFIG)
     self._dispatcher._base_url = self.CREDS['api']
     remove_temp_secrets()
     output_name = self._dispatcher.output_cred_name(self.DESCRIPTOR)
     put_mock_creds(output_name, self.CREDS, self._dispatcher.secrets_bucket, REGION, KMS_ALIAS)
Пример #2
0
 def setup(self, provider_constructor):
     """Setup before each method"""
     provider = MagicMock()
     provider_constructor.return_value = provider
     provider.load_credentials = Mock(
         side_effect=lambda x: self.CREDS if x == self.DESCRIPTOR else None)
     self._provider = provider
     self._dispatcher = PagerDutyIncidentOutput(None)
     self._dispatcher._base_url = self.CREDS['api']
Пример #3
0
 def setup(self):
     """Setup before each method"""
     self._mock_s3 = mock_s3()
     self._mock_s3.start()
     self._mock_kms = mock_kms()
     self._mock_kms.start()
     self._dispatcher = PagerDutyIncidentOutput(None)
     self._dispatcher._base_url = self.CREDS['api']
     remove_temp_secrets()
     output_name = self._dispatcher.output_cred_name(self.DESCRIPTOR)
     put_mock_creds(output_name, self.CREDS, self._dispatcher.secrets_bucket, REGION, KMS_ALIAS)