Merge pull request #2938 from bblommers/circular_import_error

Circular import error
This commit is contained in:
Steve Pulec 2020-04-30 08:44:12 -05:00 committed by GitHub
commit 2e91b91294
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -11,7 +11,6 @@ import requests
import pytz
from moto.core.access_control import IAMRequest, S3IAMRequest
from moto.core.exceptions import DryRunClientError
from jinja2 import Environment, DictLoader, TemplateNotFound
@ -134,9 +133,13 @@ class ActionAuthenticatorMixin(object):
ActionAuthenticatorMixin.request_count += 1
def _authenticate_and_authorize_normal_action(self):
from moto.iam.access_control import IAMRequest
self._authenticate_and_authorize_action(IAMRequest)
def _authenticate_and_authorize_s3_action(self):
from moto.iam.access_control import S3IAMRequest
self._authenticate_and_authorize_action(S3IAMRequest)
@staticmethod

View File

@ -25,8 +25,6 @@ from botocore.credentials import Credentials
from six import string_types
from moto.core import ACCOUNT_ID
from moto.iam.models import Policy
from moto.iam import iam_backend
from moto.core.exceptions import (
SignatureDoesNotMatchError,
AccessDeniedError,
@ -44,6 +42,7 @@ from moto.s3.exceptions import (
S3SignatureDoesNotMatchError,
)
from moto.sts import sts_backend
from .models import iam_backend, Policy
log = logging.getLogger(__name__)