Fix S3 tests for IAM

This commit is contained in:
Joseph Schorr 2016-08-15 20:34:17 -04:00
parent 14b93f72ff
commit 06718d1237

View file

@ -20,7 +20,7 @@ class TestCloudStorage(unittest.TestCase):
# Create a test bucket and put some test content.
boto.connect_s3().create_bucket(_TEST_BUCKET)
self.engine = S3Storage(None, 'some/path', _TEST_USER, _TEST_PASSWORD, _TEST_BUCKET)
self.engine = S3Storage(None, 'some/path', _TEST_BUCKET, _TEST_USER, _TEST_PASSWORD)
self.engine.put_content(_TEST_PATH, _TEST_CONTENT)
def tearDown(self):
@ -50,7 +50,7 @@ class TestCloudStorage(unittest.TestCase):
def test_copy_samecreds(self):
# Copy the content to another engine.
another_engine = S3Storage(None, 'another/path', _TEST_USER, _TEST_PASSWORD, _TEST_BUCKET)
another_engine = S3Storage(None, 'another/path', _TEST_BUCKET, _TEST_USER, _TEST_PASSWORD)
self.engine.copy_to(another_engine, _TEST_PATH)
# Verify it can be retrieved.
@ -58,7 +58,7 @@ class TestCloudStorage(unittest.TestCase):
def test_copy_differentcreds(self):
# Copy the content to another engine.
another_engine = S3Storage(None, 'another/path', 'blech', 'password', 'another_bucket')
another_engine = S3Storage(None, 'another/path', 'another_bucket', 'blech', 'password')
boto.connect_s3().create_bucket('another_bucket')
self.engine.copy_to(another_engine, _TEST_PATH)