from app.logging import LogLevelContext, handler_logging from app.models.follower.enums import FollowStatus from app.models.user.enums import UserStatus, UserSubscriptionLevel from .dispatch import DynamoDispatch DYNAMO_FEED_TABLE = os.environ.get('DYNAMO_FEED_TABLE') S3_UPLOADS_BUCKET = os.environ.get('S3_UPLOADS_BUCKET') logger = logging.getLogger() xray.patch_all() secrets_manager_client = clients.SecretsManagerClient() clients = { 'appstore': clients.AppStoreClient(secrets_manager_client.get_apple_appstore_params), 'appsync': clients.AppSyncClient(), 'cognito': clients.CognitoClient(), 'dynamo': clients.DynamoClient(), 'dynamo_feed': clients.DynamoClient(table_name=DYNAMO_FEED_TABLE), 'elasticsearch': clients.ElasticSearchClient(), 'pinpoint': clients.PinpointClient(), 'real_dating': clients.RealDatingClient(), 's3_uploads':
def appstore_client(): yield mock.Mock( clients.AppStoreClient(lambda: { 'bundleId': '-', 'sharedSecret': '-' }))
from app import clients, models from app.handlers import xray from app.logging import LogLevelContext, handler_logging from app.models.follower.enums import FollowStatus from app.models.user.enums import UserStatus from .dispatch import DynamoDispatch DYNAMO_FEED_TABLE = os.environ.get('DYNAMO_FEED_TABLE') S3_UPLOADS_BUCKET = os.environ.get('S3_UPLOADS_BUCKET') logger = logging.getLogger() xray.patch_all() clients = { 'appstore': clients.AppStoreClient(), 'appsync': clients.AppSyncClient(), 'dynamo': clients.DynamoClient(), 'dynamo_feed': clients.DynamoClient(table_name=DYNAMO_FEED_TABLE), 'elasticsearch': clients.ElasticSearchClient(), 'pinpoint': clients.PinpointClient(), 's3_uploads': clients.S3Client(S3_UPLOADS_BUCKET), } managers = {} album_manager = managers.get('album') or models.AlbumManager(clients, managers=managers) appstore_manager = managers.get('appstore_receipt') or models.AppStoreManager( clients, managers=managers) card_manager = managers.get('card') or models.CardManager(clients, managers=managers)
from .. import xray from . import routes from .exceptions import ClientException S3_UPLOADS_BUCKET = os.environ.get('S3_UPLOADS_BUCKET') S3_PLACEHOLDER_PHOTOS_BUCKET = os.environ.get('S3_PLACEHOLDER_PHOTOS_BUCKET') logger = logging.getLogger() xray.patch_all() secrets_manager_client = clients.SecretsManagerClient() clients = { 'apple': clients.AppleClient(), 'appstore': clients.AppStoreClient(), 'appsync': clients.AppSyncClient(), 'cloudfront': clients.CloudFrontClient(secrets_manager_client.get_cloudfront_key_pair), 'cognito': clients.CognitoClient(), 'dynamo': clients.DynamoClient(), 'facebook': clients.FacebookClient(), 'google': clients.GoogleClient(secrets_manager_client.get_google_client_ids), 'pinpoint': clients.PinpointClient(), 'post_verification':