Fix the tests and implement a fake stripe.

This commit is contained in:
jakedt 2014-04-10 15:20:16 -04:00
parent 4f3fa34206
commit d39f3cc5d4
14 changed files with 262 additions and 136 deletions

View file

@ -154,15 +154,18 @@ class Userfiles(object):
download_userfile_endpoint, methods=['GET'])
userfiles = LocalUserfiles(path)
elif userfiles_type == 'S3Userfiles':
elif storage_type == 'S3Userfiles':
access_key = app.config.get('USERFILES_AWS_ACCESS_KEY', '')
secret_key = app.config.get('USERFILES_AWS_SECRET_KEY', '')
bucket = app.config.get('USERFILES_S3_BUCKET', '')
userfiles = S3Userfiles(path, access_key, secret_key, bucket)
else:
elif storage_type == 'FakeUserfiles':
userfiles = FakeUserfiles()
else:
raise RuntimeError('Unknown userfiles type: %s' % storage_type)
# register extension with app
app.extensions = getattr(app, 'extensions', {})
app.extensions['userfiles'] = userfiles