Skip to content

Commit

Permalink
Mock AWS credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorenz Hufnagel committed Nov 16, 2018
1 parent ed861ec commit cf5bd76
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 cf5bd76

Please sign in to comment.