This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as R from 'ramda'; | |
import { Request, Response } from 'express'; | |
import { StatusCodes } from 'http-status-codes'; | |
import { ExternalAccountNature, ExternalAccountOwnerType } from '../../../lib/cft/externalAccount/types'; | |
import { CFTUrl } from '../../../lib/cft/apiUrls'; | |
import * as CFT from '../../../lib/cft'; | |
import mapErrorMessageToFailureReason from '../../helpers/mapErrorMessageToFailureReason'; | |
import { isLeadOwnedBankAccount, validateBankAccount } from '../../../lib/cft/enrollClient/helpers/enrollmentOperations/createAndValidateBankAccount'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: > | |
ts-sam-test | |
Sample SAM Template for ts-sam-test | |
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst | |
Globals: | |
Function: | |
Timeout: 10 | |
Runtime: ruby2.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'aws-sdk-dynamodb' | |
require 'mail' | |
require 'aws-sdk-ses' | |
def respond(event:, context:) | |
event['Records'].each do |record| | |
ses_client = Aws::SES::Client.new(region: 'us-west-2') | |
db_client = Aws::DynamoDB::Client.new(region: 'us-west-2') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Any import from src or main should be done inside setup_and_run function | |
# importing them here causes mock.patch to fail | |
import asyncio | |
import os | |
from typing import List, TypedDict | |
from unittest.mock import AsyncMock | |
from fastapi import testclient | |
import pytest | |
from unittest import mock |