def test_env_decryptor_boto_error(self, mock_boto): mock_boto.client().decrypt.side_effect = ClientError outEnv = SessionManager.decryptEnvVar('testing') self.assertEqual(outEnv, b64encode('testing'.encode('utf-8')).decode('utf-8'))
def test_env_decryptor_non_encoded(self, mock_boto): mock_boto.client().decrypt.return_value = {'Plaintext': 'testing'} outEnv = SessionManager.decryptEnvVar('testing') self.assertEqual(outEnv, 'testing')