Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

fix(MWAA): fixes tests #212

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions MWAA/tests/test_verify_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
import pytest

from moto import mock_s3
from moto import mock_s3, mock_s3control
from verify_env import verify_env

@pytest.fixture
Expand Down Expand Up @@ -41,31 +41,31 @@ def test_validation_region():
https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/
'''
regions = [
'us-east-2',
'us-east-1',
'us-west-2',
'ap-northeast-1',
'ap-northeast-2',
'ap-south-1',
'ap-southeast-1',
'ap-southeast-2',
'ap-northeast-1',
'ca-central-1',
'eu-central-1',
'eu-north-1',
'eu-west-1',
'eu-north-1'
'eu-west-2',
'eu-west-3',
'sa-east-1',
'us-east-1',
'us-east-2',
'us-west-2'
]
for region in regions:
assert verify_env.validation_region(region) == region
unsupport_regions = [
'us-west-1',
'af-south-1',
'ap-east-1',
'ap-south-1',
'ap-northeast-3',
'ap-northeast-2',
'ca-central-1',
'eu-west-2',
'eu-south-1',
'eu-west-3',
'me-sourth-1',
'sa-east-1'
'me-south-1',
]
for unsupport_region in unsupport_regions:
with pytest.raises(argparse.ArgumentTypeError) as excinfo:
Expand Down Expand Up @@ -250,6 +250,7 @@ def init_s3():
permisions
'''
@mock_s3
@mock_s3control
def _init_s3(is_bucket_access_blocked, is_account_access_blocked):
s3_client = boto3.client('s3', region_name=TEST_ACCOUNT_REGION)
s3_client.create_bucket(Bucket=TEST_BUCKET_NAME)
Expand Down