Beispiel #1
0
 def setup(self):
     """Setup before each method"""
     self._dispatcher = KomandOutput(REGION, ACCOUNT_ID, FUNCTION_NAME,
                                     CONFIG)
     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)
Beispiel #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 = KomandOutput(None)
 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 = KomandOutput(None)
     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)