Skip to content

Commit

Permalink
Misc. style tweaks to S3Cache changes and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Yolken committed Feb 3, 2017
1 parent 1546b1a commit 00b6b0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions superset/results_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def __init__(self, default_timeout=300):
self.default_timeout = default_timeout

self.s3_client = boto3.client('s3')

self.bucket = config.get('S3_CACHE_BUCKET')
self.key_prefix = config.get('S3_CACHE_KEY_PREFIX')

Expand Down
3 changes: 2 additions & 1 deletion tests/results_backends_tests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import cPickle

import mock

from superset import app, results_backends
Expand Down Expand Up @@ -44,7 +45,7 @@ def test_s3_cache_set(self):
self.assertEquals(call_args[1], 'test-bucket')
self.assertEquals(call_args[2], 'test-prefix/test-key')

def test_s3_cache_exception(self):
def test_s3_cache_set_exception(self):
self.mock_s3_client.upload_fileobj.side_effect = Exception('Something bad happened!')
result = self.s3_cache.set('test-key', 'test-value')

Expand Down

0 comments on commit 00b6b0a

Please sign in to comment.