Skip to content

Commit

Permalink
Merge pull request #1952 from lhufnagel/master
Browse files Browse the repository at this point in the history
Mock AWS credentials
  • Loading branch information
spulec committed Dec 29, 2018
2 parents c8a35f0 + cf5bd76 commit ca2950f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions moto/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import functools
import inspect
import os
import re
import six
from io import BytesIO
Expand All @@ -21,6 +22,11 @@
)


# "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

Expand Down

0 comments on commit ca2950f

Please sign in to comment.