S3 LocationConstraint test can only be run in non-ServerMode

This commit is contained in:
Bert Blommers 2020-02-02 12:45:57 +00:00
parent d5a36752d7
commit ceb16b00a7

View File

@ -1118,8 +1118,13 @@ def test_bucket_location_nondefault():
) )
@mock_s3 # Test uses current Region to determine whether to throw an error
def test_s3_location_should_error_outside_useast1(): # Region is retrieved based on current URL
# URL will always be localhost in Server Mode, so can't run it there
if not settings.TEST_SERVER_MODE:
@mock_s3
def test_s3_location_should_error_outside_useast1():
s3 = boto3.client("s3", region_name="eu-west-1") s3 = boto3.client("s3", region_name="eu-west-1")
bucket_name = "asdfasdfsdfdsfasda" bucket_name = "asdfasdfsdfdsfasda"