From 89008c423047f6cf9b5f4c5ed696e395c8c13429 Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Wed, 31 Aug 2022 11:11:50 +0000 Subject: [PATCH] Tech Debt: Skip some tests in Py3.6, as we do not have access to all regions (#5437) --- tests/test_iam/test_iam.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_iam/test_iam.py b/tests/test_iam/test_iam.py index 54e533c98..cb71832d4 100644 --- a/tests/test_iam/test_iam.py +++ b/tests/test_iam/test_iam.py @@ -1,4 +1,5 @@ import json +import sys import boto3 import csv @@ -15,6 +16,7 @@ import pytest from datetime import datetime from uuid import uuid4 from urllib import parse +from unittest import SkipTest from moto.s3.responses import DEFAULT_REGION_NAME @@ -3728,6 +3730,10 @@ def test_role_config_dict(): @mock_iam @mock_config def test_role_config_client(): + if sys.version_info < (3, 7): + raise SkipTest( + "Cannot test this in Py3.6; outdated botocore dependencies do not have all regions" + ) from moto.iam.utils import random_resource_id CONFIG_REGIONS = boto3.Session().get_available_regions("config") @@ -4172,6 +4178,10 @@ def test_policy_config_dict(): @mock_iam @mock_config def test_policy_config_client(): + if sys.version_info < (3, 7): + raise SkipTest( + "Cannot test this in Py3.6; outdated botocore dependencies do not have all regions" + ) from moto.iam.utils import random_policy_id CONFIG_REGIONS = boto3.Session().get_available_regions("config")