Merge pull request #1952 from lhufnagel/master

Mock AWS credentials
This commit is contained in:
Steve Pulec 2018-12-28 20:14:26 -05:00 committed by GitHub
commit ca2950f5e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -23,8 +23,6 @@ matrix:
sudo: true
before_install:
- export BOTO_CONFIG=/dev/null
- export AWS_SECRET_ACCESS_KEY=foobar_secret
- export AWS_ACCESS_KEY_ID=foobar_key
install:
# We build moto first so the docker container doesn't try to compile it as well, also note we don't use
# -d for docker run so the logs show up in travis

View File

@ -4,6 +4,7 @@ from __future__ import absolute_import
import functools
import inspect
import os
import re
import six
from io import BytesIO
@ -21,6 +22,11 @@ from .utils import (
)
# "Mock" the AWS credentials as they can't be mocked in Botocore currently
os.environ.setdefault("AWS_ACCESS_KEY_ID", "foobar_key")
os.environ.setdefault("AWS_SECRET_ACCESS_KEY", "foobar_secret")
class BaseMockAWS(object):
nested_count = 0