From ff8dd7530d324c684b53e8967e0b247f5f533fff Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Sun, 2 Aug 2015 09:54:23 -0400 Subject: [PATCH] Add boto3 s3 test. --- tests/test_s3/test_s3.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_s3/test_s3.py b/tests/test_s3/test_s3.py index 8e1c35f5..ca54988f 100644 --- a/tests/test_s3/test_s3.py +++ b/tests/test_s3/test_s3.py @@ -8,6 +8,7 @@ from io import BytesIO import json import boto +import boto3 from boto.exception import S3CreateError, S3ResponseError from boto.s3.connection import S3Connection from boto.s3.key import Key @@ -869,3 +870,18 @@ def test_policy(): bucket = conn.get_bucket(bucket_name) bucket.get_policy().decode('utf-8').should.equal(policy) + + +""" +boto3 +""" + + +@mock_s3 +def test_boto3_bucket_create(): + s3 = boto3.resource('s3', region_name='us-east-1') + s3.create_bucket(Bucket="blah") + + s3.Object('blah', 'hello.txt').put(Body="some text") + + s3.Object('blah', 'hello.txt').get()['Body'].read().should.equal("some text")